If I was introduced to bodybuilding before participating in Olympic weightlifting, squats would never feature on my radar, or at best, would never be the primary exercise if optimal leg muscle development was my aim, and in bodybuilding that is the main aim above all else.
I've said it before and I'll repeat it here:
...if you're an Olympic weightlifter, then go and do some front squats because you're going to need it.
...if you're a powerlifter, then go and do some back squats because you're going to need it.
...if you're a bodybuilder, you may choose to do both, but never as your primary exercise, as this is relegated more to the most versatile of all leg developers, and that is the leg press.
No one has to agree, but if I was to do it all over again, or to coach you into muscle building over all else, then the leg press would most definitely take precedence over all other leg movements. I call it the most versatile leg movement for a very good reason, as this versatility is connected with its foot plate and the way you can manipulate the muscle stimulus simply by shifting your feet/utilising different feet positioning. Something that is impossible to do whilst squatting, unless you like to invite injury to your back, knees, and hip areas.
Had we been discussing the optimal exercise for optimal cardiorespiratory efficiency, then with out a doubt, the squat would feature amongst the best of the best right on top of the list..., but we're talking muscle building instead of maximising on lung and heart efficiency.