To be fair once they're down they're actually held in place mechanically.
It may be best to consider that (normally) they are held in place with both mechanical and hydraulic means. Mechanical = overcentered side struts and bungee springs. Hydraulic = downlock actuators. As engineers, during tows, we didn't rely on either of these. We used pins to lock the struts.