Free weights work for compound movements like bench press and squat because the downward force of gravity can always be distributed across two or more joints to maintain tension throughout the entire range of motion. Even then, tension decreased to nothing at the top of the exercise, which still isn't optimal. Ideally, one should be able to squeeze at full contraction to create the optimal workload.
Free weights don't work as well as machines and cables for single joint exercises like curls, hamstring curls, tricep extensions, lateral raises, etc. because the force of gravity exerted on a joint changes throughout the movement, causing tension to applied unevenly and not at all at some points.
Think about doing a curl with your upper arms fixed against your side perpendicular to the ground. At the beginning of the movement, the weight is moving straight forward in front of you, and when your arms are 90 degrees the weight is moving straight up. When your biceps are fully stretched at the bottom of the movement, they are at their strongest, but they will be doing no work because of the lack of resistance against gravity. When your biceps are at a 90 degree, they are at their weakest, but this is when they are bearing the most weight from the exercise. This is the opposite of how the resistance profile should work. With a machine, a resistance profile can be created so that the biceps bear the same load throughout the exercise or a load that is greatest at full stretch and weakest at full contraction. The same applies for every muscle.