End crystals do more damage when they blow up your feet, so if you are on the same level as an endcrystal when it explodes, it kills you. If you are lower down then it does less damage. However, if you then have the same scenario except there is another end crystal two blocks up, and you detonate that one instead, then the one on the same level as you will blow up, but not do any damage.
I made a video demonstrating and explaining it:
https://www.youtube.com/watch?v=XsCyq9kgq1Q
The bottom end crystal is being destroyed by the top one therefore this is a duplicate of MC-118429