Bobmij,
Perhaps some examples will help.
Take a typical jet with a best angle climb speed of about 220 knots and a best rate climb speed of about 290 knots.
Climb at 220Kts to FL390 might take 25 minutes with an average climb rate of about 1,560 FPM and average TAS of about 300 knots covering lets say about 120 miles.
Climb at 290 Kts (eventually becoming a particular Mach Number) might only take 21 minutes with higher average rate of climb of 1,860 FPM but with a much higher average speed of say 400 knots. This means we will have covered about 140 miles. So it took less time but covered more distance. The reason really being that the average speed is so much higher than that achieved when flying at best angle.
Although these numbers are made up, they are fairly realistic. Hope it helps!
CP