I always thought that before buying land you need a survey first? Someone I know bought land, built a house but some time later when his neighbors turned up and informed him that he'd fenced in part of their land he didn't want to hear any more. He had them kicked out of his house but when the surveyors came they convinced him that his land was much smaller than those who'd sold it to him wanted him to believe. How common are such [boundary] disputes? Do they arise because someone fails to get the property they are buying surveyed or do they deliberately "invade" their neighbors property?
Very simple. In days of yore properties were defined by physical features that change over centuries. My relative's property was originally defined by fields, stone walls, streams and trees. After 200 years, stream beds move, walls fall, and trees die. A recent survey missed connecting on the opposite corner by 300 feet; the acreage decreased from 32 to 28 acres after negotiations with neighbors. Then there are transcription errors (every try to read the cursive writing on old ancestry-type documents?), data entry errors on converting to computerized records, changes in the technology measuring instruments, and flat out errors induced by carelessness or lack of paying attention. Old easements are forgotten about, lost in time, or not researched, a big oops when new permits are sought. And so forth...
If you are hiring a company to install a fence, they will often insist on a survey before they even give you a quote for that reason. I don't think most people bother with a survey before they purchase unless it's a really undeveloped area. In residential areas the lots are all sitting right next to each other and while you may dispute whether a plant is in your yard or theirs, you know roughly how big your yard is.
I think it is necessary to have the property surveyed first before buying and building on it so you could be sure that you are building in the right space and boundary. I'm surprised at how your friend didn't bother to have the property surveyed first. I have relatives who had the same problem as your friend. Their grandmother who initially owned the land they are now inhabiting sold some parts of the property without them knowing, so they just built their house on the property not knowing that they built on a part of the property which was sold. Problems do arise if important things are missed out in dealing with properties.
I know here in the UK, when you purchase property or land you have a survey done and then you can compare that with what it says on the land registry. Any deviation in the two and you have the right to challenge. I think a lot of people aren't too bothered about a fence or wall being a little over their boundary, but I'm sure that would be different if they found that it's brought down the price of what they own by any considerable amount.
Those disputes usually happens due to poor measurements, so from a certain point on no one knows where a certain land starts and the other ends. On the other hand, that also depends a lot on the owners, on their good will.
Our neighbor at the back used our concrete fence for the wall of their dirty kitchen. We are the 3rd owner of this house and it was already like that when we came in. But we just let it be for now since we don't want to agitate people. Besides, that's only a fence. However, one time the guy was kind of grouchy as if wanting us to get rid of our tree. That was when we raised our voice and told that rude neighbor about our concrete fence. He was quiet since then.. until now. So we have harmony somehow.