This question is in regard to GoPro action cameras but even for other brands, it can come into play. When GoPro released their Hero 5 Black action camera, they demonstrated how they can change the firmware in a specific manner that would make after-market batteries obsolete. Thus, requiring you to invest in their official batteries. But, it is unknown if they will choose to do that again and as one user pointed out when they did it before they did not send out a notice to inform their audience.
To be safe, you may want to stick with the official GoPro-branded batteries when you are using any of their action cameras.