Third, they have sharp corners and knobs. That will help aggravate all those nerve endings in your foot.
Lastly, they have no give. While many toys might give when you step on them, Legos don't. A single brick can support 953 pounds before it compresses. That means when you step on a Lego, the lack of give transfers all that force right back into the sole of your foot, rather than absorbing some of the force exerted on it.
Whistler goes even more in depth in the video above. Knowing this information probably won't make you pick up Legos you see on the ground, but maybe there's some comfort to be derived from knowing that yes, Legos do hurt a whole lot when you step on them.