Im not sure if this is a feature or not, but the ender dragon doesn't regenerate enough health from one or two ender crystals alone, making it so players can leave two and kill the dragon.
Comments 6
The Java pre-release 6 changelog archived at https://minecraft.gamepedia.com/Java_Edition_Beta_1.9_Prerelease_6 states that end crystals βFires a healing beam at the ender dragon when in range.β So it was not the developers intention to make the dragon invulnerable while any crystals remain, nor was it the intention to make the ender dragon always get healed. It has to fly by a crystal to be healed.
Thank you for your report!
However, this issue is Working as Intended.
The report you have submitted is working as intended: End Crystals are only meant to heal the dragon, not prevent it from dying (as mentioned above).
Please note, that mechanics of the game may change between updates.
Things such as graphics, sounds, world creation, biomes, redstone, villagers, and animals may not work the same in current versions.
Full Version History β Snapshot Version History β Feature Requests and Suggestions
Quick Links:
π Issue Guidelines β π¬ Community Support β π§ Customer Support β βοΈ Feedback and Suggestions β π Game Wiki
Not really a bug, you can kill it with all crystals intact. (With beds)