As far as the basic discussion as to portal behavior. The overall issue is that portals have no memory. They only link to the closest portal within 128 nether blocks of itself or 1024 overworld blocks. Which for our worlds is not much room to work with.
It also does not often make a matching portal in the nether. My portal on the old survival is a perfect example. I was ontop of the lava lake in the Nether. When the portal was created it could not create on the lake and kept checking deeper into the lake, rather than an actual radius of where I created. So my portal was created on the opposite side of the lake like 200 nether blocks away, rather than about 20 nether blocks the other way. So once someone else built a newer portal on that side of the world my portal never worked as it created ever again.
I did eventually make a little platform on the correct side of the lava lake and linked it manually.
As for Y, it is suppose to check but because they are linking to the closest within 1024 X&Z blocks the few hundred for Y is usually irrelevant. When I manually make portals in the nether I like to get close the Y. Using Y you can place portals very close to each other in the nether if your are making them manually. But thats only really required when in a very crowded portal area. But it is suppose to check Y within the 128 block rule to my knowledge.
Playing: Minecraft, FFXIV, World of Tanks, EvE
Retired from many, incl: WoW: Aesha, Kael'thas; FFXI: Ehlynia, Pandy; Tera: Ehlynia, PvE.