In Europe, in our grandparents’ or even parents’ childhoods - as late even as the 1970s - housing and transport was very different to how it is now. Clothing was largely purpose-specific; people had far fewer clothes than today but those clothes had more specific purposes. For men that mean different weights of woollen suits for spring and autumn versus winter, and linen suits for summer.
Houses weren’t so well insulated or heated so you dressed to stay warm. With cars less common, you dressed for the outdoors. Hats weren’t fashion statements: they were to help keep you dry and warm.
Go back 100+ years and roads were much worse, people travelled by horse.
Capes, gloves, boots: things like this were all a defence against mud and rain and weather. If you were riding a horse you needed something like a cape with a high collar to stop your back and face getting splattered with mud thrown up by the horse’s hooves.
But more importantly, at the wealthy end of society, dressing was an indication of status and leisure. The clothes in the first picture are clearly somewhat impractical, but that doesn’t matter if your only task for the day is to sit and talk or stroll gently. If you have a team of people to dress you and look after your clothing you can wear impractical layers of clothing that seem ridiculous today. Those layers were still designed to serve a purpose - largely keeping warm - but the application and design of that purpose became exaggerated as purpose took a subsidiary role to status.
Many countries also had “sumptuary laws” which forbid lower classes of people from using certain fabrics or colours or dressing in particular ways. This meant that clothing for the higher classes was an articulation of power and status: in the 17th century you could tell instantly from someone’s style of dress whether they were a peasant, farmer, merchant, or aristocrat. That articulation of status - for the highest classes - meant that clothing was designed to show off the elements of dress that were reserved to that class of people.