Not quite. "Out of principle" means doing something because you think you should, based on your moral principles. But you are right that it often means doing something that you would not usually do! So this sentence means that even though other people had lived in this place before him, he was the first person to choose to do it because he felt like it was the good/right/important thing to do. I hope that helps!