Comment on Moon Landing Hoax by jfb.
The foil acted as a thermal blanket, reflecting as much of the sunlight as possible to keep the base of the LM from overheating. The foil was only about 125 microns thick, making it extremely lightwaight (always a plus), and since it was only ever meant to be used in a vaccuum, it didn’t need to be streamlined.
Even the Shuttle orbiters used blankets instead of tiles where they could get away with it.
Most real-world spacecraft aren’t “pretty”.