Capital punishment for blasphemy is a mainstream theological position in Islam, accepted by the 4 major Sunni schools of thought. I do not know of any Shia tradition that goes against this position either. The only exception in my knowledge is one Sunni tradition, the Hanafi school, that prohibits the killing of non-muslims specifically for the crime of blasphemy, that too only if they are not habitual offenders. So, e.g. satirists like Charlie Hebdo would still face capital punishment, and of course any Muslim that commits blasphemy (e.g. ex-muslim atheists like me).
According to this Pew Poll, 84% of Pakistanis favor Islamic Sharia becoming the law of the land. This matches my personal experience. I know very few Muslims who think of Sharia as an unjust legal system.
I know many people who privately disagree with the idea of a death penalty for blasphemy. However, when you live in a country that is an "Islamic republic", Islamic jurisprudence as a big influence on the legal system, and with Islam in general having a hegemony over public morality, your private disagreement does not matter and has no political power. Basically, the whole country is held hostage by Islam. And every Pakistani knows that capital punishment for blasphemy is the mainstream position. Every single Pakistani knows that being perceived as committing blasphemy, or even publicly disagreeing with the blasphemy law puts you in danger.
In 2011, one of our sitting governors was assassinated by his own security guard for allegedly committing blasphemy. His killer, Mumtaz Qadri, became a hero for the religious right overnight and the killer's funeral (he was executed by the state for vigilante assassinating the governor; despite the blasphemy law, only the State has the right to execute convicted blasphemers) was attended by thousands of devotees. His grave has turned into a shrine.
The Tehreek-e-Labbaik party, a far-right Islamist party whose primary raison d'être is defending Islam from blasphemers has held protests large enough to paralyse the whole country and enjoyed significant electoral success in 2018.
So, no, it is not a law that is imposed by a tyrannical minority. It is a law imposed by the majoritarian hegemony of one religion.
And in my opinion, and subjective experience, this holds true for not just Pakistan but most muslim-majority countries. I would feel just as unsafe as an atheist in any muslim-majority country as I currently do in Pakistan.
Yeah, so if the vast majority of the country is bat shit crazy then I don't know how to fix it. The only examples I can point to for dismantling a dangerous national ideology is Germany and Japan post WW2 and it was not a happy road getting there.
I wouldn't say majority of the country is batshit crazy, it is just held hostage by an archaic religion that is extremely violent towards blasphemers.
You might say, that is not much of a difference, but imo it is a meaningful difference because most muslims disagree or refuse to act on this belief (as evidenced by the police and shopkeepers who protected the girl), they just can't do anything to change that it is part of orthodox Islam. So the hardliners win on this one, every time.
Only way to fix it is to secularize the state, which will either take a revolution or a lot of fucking time. Definitely not happening in my lifetime.
Out of curiosity, is being an atheist something that can get you in trouble? Or being someone who used to be muslim? Or is it a case that as long as you aren't committing blasphemy or something like that you are relatively safe?
Generally, if you keep a low profile, you're fine. It's not like the average person will try to fight you if they find out you're an atheist. It is extremely taboo, though. In my case, most of my friends are left-wing activists and/or artists, so it is not a problem for me socially, but I think I am an outlier in that respect. I do hide it at the office though (or at least I did when I was going to one), and from my extended family, and of course from strangers.
It is absolutely not something you can be public about. If somehow, you become publicly visible and recognized as an atheist, it is best that you flee the country lest you end up in the same situation as the girl in the OP.