Same way Elizabeth marries Darcy in Pride and Prej - creative licence. It probably wouldn't have happened, but it's a fictional story, so they can kinda do whatever they want. However, if it was going to happen, then it's most likely that someone died and left him money. If you had a distant relation (let's say a second or third uncle) who had a fair bit of money or property, but only had duaghters and no nephews etc, then you could easily end up inheriting a property or a lot of money without actually ever really doing anything. I do get the impression that Thornton actually managed to work his way up somehow though, so that's probably not very relevant.