One difference between doing squats and deadlifts and doing strength work on the bike is the range of motion, which is much bigger when actually lifting weights. So, if you are trying to improve mobility, reduce injury and the like, gym work is superior in that respect.