I have read that proteins find the correct folding pattern way faster than pure chance would allow, indicating the proper folding is itself somehow encoded in the DNA. Further a misfolded protein is a prion and is what causes conditions like CJD, Kuru, and Fatal Insomnia.
The protein is already folding while more amino acids are being added. So its not the same level of randomness as if you had the entire string ready and just let it go.
Many proteins are helped along by chaperone proteins that help them to fold properly. The chaperones are usually of the heat shock protein (hsp) class.
Misfolding of proteins happens frequently. Those proteins are recognized early on by other proteins that target the misfolded proteins for destruction. Prions are misfolded proteins that elude the destruction process. As a result, they build up slowly and eventually cause problems.
Current belief is that a prion is a misfolded protein like structure which causes disease...but a misfolded protein is not necessarily a prion.