Because they are originally intended to support "this object can do X"-scenarios. For example: "this tile entity has an inventory" (or in capability-speak: "this tile entity has the inventory capability").
For example, to get an object's inventory capability you call thing.getCapability(ITEM_HANDLER_CAPABILITY, null). This gives you a LazyOptional, which will either be present (thing has an inventory) or not (thing doesn't have an inventory). The facing can be used to convey additional info. For blocks it means the actual facing (a furnace exposes a different inventory on the top than on the bottom), for other things it could mean all kinds of things (entities use sides to give access to separate inventories for just armor or just the held item).
Additionally, you can also use AttachCapabilitiesEvent to attach capabilities to "foreign objects". What you attach here is not really a capability, but a capability provider ("something that can have capabilities") - the capabilities given by this provider will also be exposed by the "foreign object". This provider is special, in that it can also save data, which will be attached to the "foreign object". This whole mechanism allows you to:
Write your own capability which stores the data you need.
Write your own provider which manages serialization of that data and exposes the capability.
Attach that provider to all players using AttachCapabilitiesEvent - players will now store your data.
Hello There! Today is the day we get sorted into our Hogwarts Houses! But it is very different than it is in the movies, we actually have to answer a series of questions and then we will be put into the houses. But during our questions of course we have to meme during it which just makes up for some hilarious moments! I hope you all enjoy this video and if you did don't forget to like and sub for more!