There's actually no such thing as a bottomless pit. Dr. Wily (and the rest of the honorable villains club) just put a load of spikes at the bottom.