Did anybody even bother watching the events these guys competed in? Bolt was absolutely crushing and embarrassing his competition, whereas phelps was winning by millimeters and hundreths of a second in many of his events.
On top of that, phelps was never the fastest swimmer, refusing to compete in either the 50m freestyle or the 100m freestyle, which is sort of the swimming equivalent to the 100m and 200m sprint.
The reason phelps was able to rack up the many medals that he did is because he was the most diverse/versatile swimmer with insane cardio/endurance; his butterfly was among the best in the world, while his breaststroke and backstroke were just a tiny bit below that (but still great) so he could dominate the medley races.
Sprinting doesn’t have as many convoluted events, it’s just running as fast as you can over the designated distance, and bolt did that better than anyone ever.