The "risk" he was taking was slight. Given that his goal was to be promoted, the status quo — remaining a line manager on a struggling team — was a failure, rather than being neutral.
Importantly, with the benefit of experience he's now in a position to identify that moving teams was less risky than he'd even assumed. This is not just survivor bias either — in management you aren't rewarded for keeping a floundering team afloat. You need to attach yourself to a team that is making your manager and their managers look good.