PE firms usually use investment banks when they sell one of their portfolio companies. This is because selling a company requires an extensive network of buyers which investment banks have access to. Additionally, there are also a lot of processes that investment banks have automated, and they are able to do the behind-the-scenes work more efficiently than a private equity firm. Additionally, investment banks have access to large analyst teams from different groups, while private equity firms are usually too lean to run a sales process.
An investment bank also allows the PE firm to keep the sale of the company confidential, as the investment bank can keep the name of the target anonymous except for interested parties that have signed a non-disclosure agreement (NDA).
Sometimes PE firms may also hire an investment bank for larger acquisitions, but this is not always necessary because PE firms will have many ex-bankers on their team who have deal experience and can handle an acquisition process. Acquisitions do not require a third party to contact a large number of interested parties such as in the case of a sale.