There's a few things. First, don't let me fool you into thinking machines are evil. They have a place and time. I use machines myself for some exercises. But many people ONLY use machines and this is what I have a problem with.
Ideally, the majority of your workout is done using free weights.
They allow you to move through your unique biomechanical planes of motion. A squat looks similar regardless of who is doing it. However, if you look closely, our knees and hips move in unique paths, maybe not even visible to the eye. By constantly locking yourself into the machine's fixed plane of motion, overtime, this can lead to injury. This disallows you from letting your joints move through their unique biomechanical planes. This is something known as pattern overload syndrome and can lead to microtraumas overtime.
Muscles respond best when they're required to control weights, not just push against them. This brings stabilizers into the picture. When you lift with free weights, small muscles that are not necessarily used to move the weight are brought into play for balance and stabilization. Basically, more of your body is called upon when using free weights. By locking yourself to machines, you take stabilizers out of the picture for the most part. This too, can lead to injury down the road when you do something in the real world that requires the use of your stabilizers.
Free weight exercises tend to improve real-world athletic functioning— running, kicking, jumping, throwing, and/or whatever sport you happen to play or activity you choose to do.