This is what happens when you run from the bear. They follow you. To be fair, it seemed like the people were trail-running to begin with, so they probably just didn't want their heart rate to drop too much.
https://www.youtube.com/watch?v=COtb575NbggAs a reminder, the recommended approach for dealing with curious bears is to hold your ground, gently speak to the bear in an even tone, and very slowly back away. Do not make sudden movements and do not run, as that triggers their chase instinct.