A few reasons you might choose law over IB:
1) The work is much more varied in law (day-to-day). As an analyst, a lot of work in IB is spent making pitch books/information memorandums on powerpoint, playing around with excel or doing research.
2) Law firms generally offer a broader range of practices. Banks generally offer M&A, capital markets (or growth capital at tiny boutiques like mine), restructuring, asset management and sales & trading (simple overview). When you join the bank, you don't usually get to sample multiple areas either (rotations might occur around industry teams, but not between banking divisions). The scope of work at law firms is much broader with more opportunities to explore areas such as tax, competition, project finance, real estate, white-collar crime.
3) You specialise a lot in banking (varies between banks). My flatmate is in the industrials team at an M&A-focused boutique and he focuses predominantly on M&A within the industrials sector.
4) Banks are huge (bulge bracket, mid-market, (elite) boutique all have 1000s of employees still) so for people who want to work somewhere where they won't be a number, that's a lot harder to find in banking. The alternative is going to a tiny boutique like the one I'm at (10-20 people max), but the deal exposure and learning experience is not as high quality.
5) The hours are marginally better in law. Average leaving time for most law firms is roughly 7pm/8pm/9pm, whereas it's a few hours later for a lot of banks (varies between banks and depending on culture ofc.). Many people go into IB knowing they will leave a few years down the line for a hedge fund/private equity firm/in-house corporate department. People do genuinely burn-out and the hours are not sustainable unless you really enjoy what you're doing.
This is just my take on this question, but hope this helps!