What is the bit type of the raster?
I have seen this when the bit type (and hence its range) is too small to account for an operation.
Here is an example (so I don't have to load an image).
The bit type for a sequence of 10,000 integers and their sums. Numbers get rolled/reused when they exceed the possible range of values (see lines 1-3) and the sum or counts are meaningless.
As you move up bit type, then the possible range of values increases until such time that going to a higher bit type doesn't result in a change of counts/sum etc since the values are all within range.
a = np.arange(10000, dtype=np.int8)
a
array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ..., 6, 7, 8, 9, 10, 11, 12,
13, 14, 15], dtype=int8)
np.sum(a)
-4872
a = np.arange(10000, dtype=np.int16)
a
array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ..., 9990,
9991, 9992, 9993, 9994, 9995, 9996, 9997, 9998, 9999], dtype=int16)
np.sum(a)
49995000
a = np.arange(10000, dtype=np.int32)
a
array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ..., 9990,
9991, 9992, 9993, 9994, 9995, 9996, 9997, 9998, 9999])
np.sum(a)
49995000
So... probably the same thing, which is why when you clipped the extent, the size got into a manageable range