At least in Microsoft's case, anyone saying "because they can charge for it" or "It's just a feature they randomly decided to lock behind a paywall" is wrong, wrong, wrong.
As an Xbox developer you are able to add things like skill-based matchmaking, P2P networking, leaderboards, achievements, and other features to your games with virtually zero effort. You also don't have to set up or run servers to maintain any of it. This is because MS built and maintains the entire infrastructure that handles everything. edit: this was extremely important back in the days of OG Xbox and early 360, because console online gaming was still a new concept to many people, and MS wanted as many devs to be on board with it as possible.
Example: I want to release a game on PC and Xbox that contains leaderboards. On Xbox I basically do nothing and it's handled for me. On PC, unless I can get my game on Steam, I'm on my own. I have to choose an implementation, and then either run a server myself or rely on a 3rd-party cloud service that I may have to pay for, and that may disappear overnight.
Obviously running all of this costs MS money. Rather than have developers or publishers foot the bill, MS asked players to pay for it instead. Seeing how the Xbox experience has been feature-packed and generally reliable, players accepted this years ago, not because MS can get away with it, but because it was (and still is IMO) a service worth paying for.
I can't speak for Sony or Nintendo as I don't know how differently they handle things.