I think it is a big part of Kim's arc, and ultimately what leads her to being removed from it all for the 6 years during BB. There had to be a believable way of dealing with removing her from Saul's world, without killing her off, and a way back for her.
For me that was the big bombshell of the end of season 4. While we knew angry Lalo would chase down Gus's operations and Nacho was probably doomed, Kim's big turn was the worrying (for her sake) develoment, that could have gone anywhere. I agree, it felt a bit odd so late on, but there were hints Kim had a wild side. There was also the money side to it. Having seen the money Jimmy got off Lalo, and the risk to get it, it was almost treated as a final heist safety net way out. Jimmy kept trying to reign her in and offered ways back, but she got sucked in, and that lead to her breaking point. And ultimately their relationship falling to bits. It had to be something dramatic.