Both the Smith machine and the free-weight bar have advantages and disadvantages. However, a Smith is more likely to be used for accessory work or by beginners who might struggle with a normal bar.
The fixed plane of motion of a Smith machine can be used as a tool for better muscle activation, in combination with constant muscle tension, but the necessary balance does not come close to that required for free-weight training.
When performing a free-weight exercise, such as squats, it is not just the legs that are involved in the movement. To stabilize the weight, you need to recruit other muscle groups so that your body acts as a unit.
For this reason, the weights you use for the Smith machine are slightly different from those you use for free-weight training. The fact that the Smith machine provides assistance and does not require weight balancing allows you to lift more.
In conclusion, free-weight training is slightly superior to using a Smith machine because it recruits more muscle groups to stabilize the weight.
This does not change the fact that the Smith machine is excellent, as it can be used for accessory work or for better muscle activation. In addition, beginners or those struggling with a free-weight bar could start with the Smith machine to learn how to execute an exercise and gain strength.