They got it at a substantial discount to its market value. They put a lot of money into it to bring it up to market value.
I wonder about these Handyman Specials coming off of charter. When you say 'market value', I suppose you mean the value the similar boat would have had if it had not been trashed and designed to house as many rental customers as possible for up to a week at a time (10 bunks and 4 heads on a 40-foot cat). What most cruising couples really want is fewer than half the bunks and heads, and lots more comfort for long-term occupancy (watermaker, lower engine hours, storage, tankage, newer electronics, not beat up, etc.), so I would have to significantly invest and change.
I would think that you could save some money if you put in significant sweat-equity / DIY, but then I wonder what your hourly rate is for that work. If you had just got a job, could you have paid a professional $120 an hour for that work and come up with a better result? The O'Kelley's channel seems to support this, as I believe they bought their Leopard 46 for $350, put an additional $120 and DIY labor in her, and ended up with a boat in the high $400s, so breakeven. Am I missing something?