Sean Doherty was a 36-year-old associate at Ropes & Gray when he got a job offer from the private equity firm Bain Capital in 2005. Doherty was a deal lawyer, which was important to Bain executives, but they weren’t looking for someone to advise them on deals. Bain had decided, after 21 years in business, that it was time to hire its first in-house lawyer.

As Boston-based Bain grew (it now has $40 billion under management) and business continued to steamroll across borders (of eight offices, two are in Europe and three in Asia), transactions had become more complicated. That was partly why managing director Mike Goss started thinking about adding an attorney to the roster.