Formatting the GoPro's SD card frees up space. But it also gets the card ready for use and keeps the filesystem healthy and minimizes the risk of errors. Here are the various ways to do it on different GoPro models.
If you're getting an error message on your computer when you try to open a video shot on the GoPro HERO9, HERO8, HERO7, or HERO6 Black, it might be because it isn't compatible with the HEVC (H.265) codec used in some of those cameras' video modes. Here are some workarounds.