Why is it that commercial passenger aircraft that fly through dangerous areas don’t carry some sort of electronic counter measure to defend themselves from missiles?

Why is it that commercial passenger aircraft that fly through dangerous areas don’t carry some sort of electronic counter measure to defend themselves from missiles? Between terrorism and the various war zones dotting the globe, it seems like it would be prudent for airliners to have them. At least for aircraft that are flying in places that are possibly dangerous.

It’s probably a lot of expense and weight. A good analysis would be appreciated if anyone is familiar with the cost of operating such a system.