It's known as associate attrition. It's entirely normal and, from the law firm's point of view, vitally necessary as part of the business model. Law firms, like consulting firms and investment banks, run a pyramid or 'up or out' model. You only need about 5-10 individuals in a class of 80-100 trainees to make partner. The rest have to go. Either to another firm, because they want to leave big law, or because they don't make the cut.
Look at
Slaughter and May. At a low around 15 years ago they only had 85 partners in London. Now they're at around 120. They allegedly recruit 90 trainees a year, but last year promoted only 6 new partners (and 5 the year before). You do the maths.
They hire so many trainees/associates because they want to ensure they maintain a partner:associate leverage at around 3 or 4 (i.e. 3-4 associates per partner) to maximise billing potential, and to do all the grunge work. It also helps MC firms because a huge number of former trainees and associates land roles in-house at corporates, banks and PE houses, making it more likely that they will award work to their former firm.
From the associate who's quitting's perspective, it's not that bad. Some in-house roles are highly sought after, high paying, career-enhancing moves (just look at how much tech GCs earn in the US). You may take a small pay cut, but there are other benefits. Cushy job. No pressure to bill. Hours are way better.
Also, it's not unheard of to see people returning from in-house roles to become law firm partners: cf Angharad Lewis, David Holdsworth, Kai Zeng, Jeremy Dennison.