Honestly, I don't know if this is intentional or not, but I never noticed it before and I don't see any bug reports about it.
The bug happens when I damage the ender dragon, leave the world, and re-enter the world. The ender dragon recovers all of its health. It doesn't matter what amount of damage or if the world is acting as a LAN or not. It happens as recently as the latest release and back to pre-release 5, though I am unaware if it happens in any earlier versions. That's all I know.