My neighborhood is fairly heavily wooded. It would be great if I could reach up and grab an orange whenever I wanted. But when it comes time to plant trees in a park or wherever, it’s never a fruit bearing tree. Why not? As long as we need to plant a tree for decoration or shade, why not plant one that yields fruit?
Might be an issue of pests. You wouldn’t want to sit in a park if it were filled to the brim with insects and other animals eating all the rotten fruit on the ground. If the tree were over a sidewalk, it’d just make it filthy.
It’s not just the mess. Many fruit trees will not produce edible fruit without a great deal of care (e.g., exta water and fertilizer, complicated spraying schedules). Most people would rather look at a hardy, healthy tree with inedible fruit than a diseased fruit tree.
Nevertheless, I agree with you that fruit trees should probably be planted more often than they are. There are some attractive, low maintenance fruit trees (e.g., loquat, paw paw).
It generally takes a fair amount of work to get GOOD fruit from a fruit-bearing tree - they require pruning, often need to have the unripe fruit thinned, and almost always require regular spraying to control diseases and pests that damage the crop. And many fruit trees (such as apples and sweet cherries) aren’t self-fertile, so you have to plant two different varieties fairly close together in order for the necessary pollination to occur, or you won’t get any fruit at all. Obviously, this means you can’t plant those types of fruit trees in a place where you only have room for one tree.
And a lot of people don’t like trees that drop things (such as seed pods), thinking them “messy”. Fruit trees will of course drop fruit, which has to be cleaned up off the lawn, so those people won’t want to plant them.
But having lived in an old house which had apple trrees, a pear tree, and a sour cherry tree in the backyard, I share your bias. It IS fun to go outside and pick your own fresh fruit!