In chemical synthesis, most (but not all) processes tend to preserve chirality of molecules: replacing a bunch of atoms in a molecule with another set will tend to not cause the molecule to flip to a mirror image. If you start from an achiral molecule (one where its mirror image can be rotated to the original), almost all processes tend to end up with a 50-50 mix of the two racemates of the product.
In biochemistry, you can derive all of the amino acids and sugars from a single chiral molecule: glyceral. It turns out that nearly all amino acids end up in the form derived from L-glyceral and nearly all sugars come from D-glyceral. The question of why this is the case is the question of homochirality.
There's as yet no full answer to the question of homochirality. We do know that a slight excess in one racemate tends to amplify into a situation where only that racemate occurs. But we don't know if the breakdown into L-amino acids and D-sugars (as opposed to D-amino acids and L-sugars) happened by pure chance or if there is some specific reason that L-amino acids/D-sugars is preferred.