You buy a GoPro to mount onto a dirt bike, or on your helmet during caving, or on a chest harness during a skydive, or on the front of your surfboard: all activities where a smartphone or a mirrorless would die on their first use.
GoPro isn't failing because the concept is wrong - the market is massive. GoPro is failing because its competitors started releasing clones which are both better and cheaper. They are the expensive premium brand in a market where buyers expect their product will need to be replaced when it inevitably can't handle the abuse anymore.