@vaccinesticker
I rarely say this but do grow up.
It is about showing respect. Have you ever been with someone as they died or recently after? It is very moving - humans still lack the language to really describe what it feels like emotionally and intellectually. Most traditions around death developed from two reasons: 1) practicality/ necessity 2) helping people to cope with the reality of death.
Both involve religious practices and traditions, which vary according to culture. When society becomes less religious, there are many hang overs.
Do you ever say "bless you" to someone when they sneeze? The response developed because centuries ago people believed that sneezing gave the devil an opportunity to enter the body.
Hospitals were originally part of religious institutions (monasteries) where monks and nuns (and they lay brothers & sisters) cared for the ill and dying. The same people who would provide hospitality to passing travellers and those in need.
Burial practices - with or without - religious rites became commonplace in the UK because centuries ago the Church didn't agree with cremation.
These are just a couple of examples- there are dozens more where old religious habits/superstitions have become part of daily life. You might find it interesting to read up on it, it would certainly give your more to feel offended by. If you don't want them as part of your culture, you'll have to found a new country.
(Good luck with that)
Back to my original point, when a person dies most people (if they experience empathy) feel the need to mark the moment and find a way to demonstrate respect. Preparing the body is one way, but not generally speaking not everyone present takes part in this. A moments silence perhaps? It isn't typically done hut you're welcome to do so if you feel more comfortable with it.
Opening the window to let the soul free may have stemmed from a faith superstition and but I don't think most people who believe in souls believe not opening a window will trap the soul. It is, instead, a respectful gesture. An acknowledgement of what has happened, an easing of the shock of the reality of death for those left behind.
If you've ever been with someone as they died, you'll know that it can still feel like they're in the room for a few hours. How do you deal with that as a bereaved person? Ignore the loved one you still feel is with you?
By all means, if you prefer to clap your hands together and say "right, that's that then, time to be off, let the next patient come in" go ahead but most people prefer to deal with it a little more sensitively. Now you know about it, you can ask it's done not when you die and your wish will be respected - by people who show much more respect with one gesture than you've shown in your posts.
Oh and you know, clapping? Applause has roots as a way to banish evil and keep the devil away after a play because plays were thought to create magic (paraphrasing a lot here) and invite the devil in. It's why they were banned by Puritans during Cromwell's rule.