Who doesn't love a nice cape? Magicians wear capes. Some pro wrestlers wear capes. Superheroes wear capes. Capes are a wonderful piece of clothing that almost anyone can pull off. That is why they are so popular in Minecraft.
Capes are a super rare cosmetic item that act like any other cosmetic in video games. They are to show off your rare collection. They are like the Minecraft version of a Season 1 Fortnite skin. There is no advantage in the game to having one, other than looking cooler than your friends.
How to obtain a cape in Minecraft
The original version of Minecraft, the Java Edition, currently has no legitimate way of obtaining a cape. There are a handful of mods available, however, that make this possible. Of course, modding any game comes at your own risk and is not endorsed in anyway. The downfall of using one of these mods is that only the Minecraft player can see the cape. No one else in the game, with some exceptions of those who have the same mod, can see it.
The Bedrock Edition of Minecraft refers to the multi-platform version of the game. This includes the mobile editions and console editions. Capes can be obtained through purchases in the Bedrock Edition. Players can purchase various skin packs from the Minecraft store. A handful of these skins contain capes as a cosmetic item that can be equipped or unequipped from that certain skin through the Character Creator.
No one knows when events will become in-person again rather than simply streamed for the audience to watch at home. Prior to 2017, MINECON events were held in-person and gave an exclusive cape to players. Purchasing a ticket or attending the event was a way to get the special cape.
After 2017, Minecraft events became were strictly live streamed. It seems this will continue with the ongoing pandemic. In 2019, a special cape was available in the Bedrock Edition for the MINECON event. It was not a reward for watching, however. In the future, more capes like this could become available.