It doesn't just happen. Proteins are large complex molecules used as food reserves but of much greater importance is their use as elements to construct cells, bones, muscles, skin, nerves, blood, hormones, etc. They also take the form of enzymes which are substances which make the complex chemical reactions of your body possible. The complex structure can be altered and destroyed simply by heating. This is what happens when you fry an egg and it turns white.
Amino acids are the building blocks of proteins.
They are assembled in a specific order in long chains like the cars of a train. Each one of these amino acids must be in the right order or the protein might function improperly. There are only six sides to a die. It is difficult to role three specific numbers in order.