In a perfect economic world, perfect competition and the lack of frictions or externalities make it possible to obtain the most efficient outcome. But once any of those assumptions is lost, outcomes are going to be worse than the first best. In particular, once there are rents to be obtained, from frictions or imperfect competition, the beneficiaries of those rents will try to protect them. And they will try to influence political outcomes in their favor.
Madhav Aney, Maitreesh Ghatak and Massimo Morelli argues that this influence peddling reinforces the market failures. As an example, they take a model of misallocation of entrepreneurial talent due to the imperfect observability of that talent. The resulting power structure then votes on institutions that reinforce such a class structure and thus amplify misallocations and market failures.
Now think about the apparently ever-increasing proportion of lawyers in the political class.