You don’t have to land anywhere you don’t want to – if you’re Pilot In Command, when you decide to land, you can decide where. If you are in an emergency situation, the most important thing is to get everyone on board safely on the ground and the plane secured so there’s no risk to people on the ground.
Other cases include flying a seaplane and have been contracted to land on the water to pick up/deliver people and cargo at a specific port. The same thing for landing in a (snow covered) field.
You may have your best girl out on a date and want to stop somewhere for a romantic picnic. The person owning the property may have an issue with you landing there and the person who owns the plane may be very angry that you landed there as you could have damaged the aircraft in a rut. It’s not the 1930s and farmers won’t be so happy you picked their property that they meet you with pitchers of lemonade and stacks of hand cut roast beef sandwiches.
As a pilot you don’t have to land at an airport but, unless you’re contracted to land somewhere else, it’s a pretty good idea (unless it’s an emergency).