I am making/placing portals in the nether every 125 blocks so I have a checkpoint of portals every 1000 blocks in the overworld.
The Y axis of my portal are is at 120, like in the screenshot below.
Now, when I entered that portal, it spawned me inside of the cave.
(the screenshot shows no portal on it since I removed it, but the obsidian is the original location of the spawned portal)
I decided to dig straight up and try to look for a reason why I spawned in the cave and I'm just seeing an area that is perfectly fine for a portal to spawn in.
My question is why did the game decided to spawn a portal in a cave? Are there some checks that the game does? All I know is if it has a space for it, it goes there.
If it matters, the game version I'm running on is 1.14.4.