I believe this happened because the terrain that I'm standing in was generated before the caves and cliffs update while the hill in the background was generated today. The whole thing is supposed to be a hill with current generation and the game blended the two generation types together but placed the ruined portal up there anyways.
Crazy Ruined Portal Generation in my Survival World