So, as the question states, on steam locomotives with six driving wheels, the rear wheels are farther from the middle wheels than the front wheels are. You can see it in these pictures:
It's sometimes less obvious, but this detail always appears to be present, even if it's really subtle and hard to see. In this picture, if you look closely, you will see that the rear pair of wheels is slightly farther back than the distance between the first two pairs of driving wheels.
I've noticed that this doesn't appear to be the case for locomotives with eight driving wheels. (Alternatively, it is present, but it's super subtle and I haven't noticed it yet.)
So, what is the reason for this and why does it only seem to apply to steam locomotives with six driving wheels?