It depends
Manufacturers often reach out and offer to send stuff for review. Whether I accept depends on whether I have much of a queue of other products and whether I'm interested in the product they're offering. I turn down more stuff than I review.
Other times if it's something I myself really want to test I'll reach out to them and see if they're willing to lend a unit.
What happens after depends too. Typically with expensive stuff, it goes back after unless you want to buy it. Cheaper units like IEMs and more budget DACs/amps etc it's generally not financially sensible for the manufacturer to pay to ship it back, refurbish, sell at a loss as open box etc, and so they'll just leave it with you. It's also quite common that a manufacturer will offer to sell a unit to you at a discount if you liked it since again it's open box now anyway.
Some reviewers sell review units (be it ones they were given or ones they bought with a discount steep enough to resell for a profit anyway) after they're done. This is a practice I am
strongly against, it's literally no different than just being paid by the manufacturer to do a review and is a clear financial incentive to be nice about their products.
Other reviewers including myself will keep ahold of units that manufacturers leave with us, both because selling them would be morally wrong, and also because then they can be used in future videos/testing for comparison which helps to make better videos.
I and others will end up with a fair amount of gear, but in my case at least, I've bought most of it. We are doing this because we're enthusiasts after all so makes sense we;d have a decent collection of our own!
The majority of headphones I have are ones I bought myself, not left over from reviews, and whilst it might sound nice to get to keep gear, honestly it's more of a problem than a benefit
@Currawong is a good example, he never sells review units, but tends to have units left with him after a review more often than others due to his location being more expensive to ship to/from. I don't envy him having to store literal drawers full of DAPs etc