Ok so let's get to the subject.
As you can see in the pictures down below The Ender Dragon if summoned,in the overworld,flyes straight ahead in the same direction.
The Ender Dragon doesn't even touch the bedrock and continues to fly.
Steps to reproduce:
1.Make a world
2.Activate Cheats
3.Write in chat the following command /summon EnderDragon
4.Notice that the dragon goes straight ahead.
Thats because It wanted to fly to the center of the world to where its portal is into at specific x y z cords not the structure.