Basically, it was there on where Nie Li lost her wife and he wanders around desert after her loss. After he wanders long enough to see more people died on desert, he found that palace which it should not be there in his current timeline. So I suspect that palace was there either after some times passed or someone build there to keep his secrets to make sure nobody found it easily in that desert.