It depends, if you buy GPUs with high resale values (1080 Ti for example) you can mine for a few months to get ROI + extra and then sell them for 80% of the original price. If your investment doesn't do very well, you may have lost money or gained little, but by mining you can gain and then get most of the money back for the rig potentially.
Or be like me and get lucky, I got 6x1080 Tis for less than $2000, muhaha! ROI in one month and now I'm on pure profit. I might sell my cards in a few months depending on how much they are still earning vs. gains from selling them.