The reason that some foods are better than protein shakes is purely for the biological value of the protein.
For instance:
If a human was to eat another humans muscle tissue then this would be a perfect match to build muscle tissue from.
But as we dont do this

then we have to get our protein sources in other ways.
Chicken, eggs, red meat have the higest most matched biological value followed by whey protein. Where as nuts and seeds have a much lower protein match to what we need to build muscle.
It gets all very complicated when you start breaking it down and looking into deeper.
But I hope you get the jist of it. :o