In other words, evolution never does whole system redesign. It's all legacy code from the beginning with incremental optimization steps in response to selection pressure at the moment.
Genes and amino acids are very close to the starting point, it's unlikely that they are optimal outside the starting environment. 4 amino acids was enough to get things going, inserting new amino asides later would require redesigning all the machinery starting from scratch. Evolution can't do that, but humans might be able to insert news stuff.
E.g. the evolution of flight. Flying is a huge advantage, but evolving towards a body capable of flight without being able to fly, should require millions of years of disadvantages to get the flying advantage. But incrememtal optimization and survival of the fittest contradicts a very slow process over several disadvantaged steps.
Environmental niches filled by squirrels, mice, small dogs, foxes, coyotes, raccoons, hawks, eagles, and numerous others would be left wide open. Those rats would start evolving into any empty niches, that were close enough. Over time/generations the further niches would become available. Smaller rats would take advantage of food sources that the mice used to eat. Better climbers would evolve to take advantages of what squirrels used to eat. Rats that specialize in eating insects would start to specialize.
Some rats would even start to specialize in eating other rats. Other rats would specialize in not getting eaten and fill the niche left by rabbits.
The rats that evolved into squirrel like mammals might specialize in jumping ever further to avoid the ground where the rat-dogs roam looking for rat-squirrels to eat. Said jumping might even evolve into flying squirrel like rats. Given enough time active flight would evolve. Rats would even start to populate the oceans.. much like whales did.
Evolving into a bird requires efficient lungs, light weight (things like hollow bones), and not wasting weight on things like powerful legs, thick skin, etc. But every step of the way would be better for some niches.
That's what I have trouble with. E.g. the climbing rat would be able to get all these higher food sources on trees. But evolving wings loses the ability to climb. And now it's competing with faster and more sturdy rats on the ground again.
I can only think about the disadvantages being no real disadvantages, because there is abundance of food and no serious competition/predators.
Evolution will try everything. If there's sturdy carnivorous rats around, the rest of the rats will try their niche. Some will try faster, some will try playing dead, others will dig holes to hide in, or climb trees. Some might grow thicker skin, or looser skin, or venom, or just being poisonous to eat.
These empty niches can be filled pretty quickly. After removing top predators like wolves for instance, the average size of coyotes has been steadily increasing over the last 50 years.
A side note, plants figured (in the evolutionary sense) that birds were great seed spreaders compared to the non-birds. Some evolved impressively strong spices (Capsicum) that birds are impervious to (up to several % by weight) that eliminated non-bird consumption of their berries. So to protect bird feed from squirrels at Capsicum.
Any bird like feature will help with a particular niche. Feathers, beaks, dexterous claws, bird songs, gliding, and of course powered flight. So it's not like you need a huge jump from land based mammal to full flight before you have any evolutionary advantage for a particular niche.
I think you are skipping steps as you try to imagine the process. Wings are at the extreme, there are intermediate features. Checkout a video of "flying squirrels", you will notice that they are more like "gliding squirrels".
As for why are there 20 encoded amino acids (+ selenocysteine and pyrrolysine)?
I've read that codon similarities hint at an original more compact alphabet of two base codons (allowing for up to 15 distinct amino acids and a stop).
I've also read that the "more recent" amino acids, like cysteine, are more readily oxidized and thus provided some advantage as atmospheric oxygen levels increased.
But all of these are guesses about the world before LUCA, which is really lost to us.