They are designed for different impacts. Rock climbing helmets are mostly their to help against hitting your head on sharp rocks, or getting hit by falling rocks. So for that fact, they have a hard shell that distributes the force across your head, and a denser foam that won't crush from getting banged around a bit. They also aren't very aerodynamic or designed to ventilate in a wind flow like on a bicycle.
Bicycle helmets are designed to absorb energy from a crash, the outer skin is very thin and doesn't do much. When you hit concrete, the foam is suppose to compress, decreasing the acceleration of your head as it comes to a stop.