"if you go to the time and effort of producing great content why would you want it to be on someone else’s site when it could be on yours."
Bang on. I think you're absolutely right there.
However, that doesn't mean guest blogging should be discounted, rather it should be used in tandem.
I always approach guest blogging with a view of introducing myself or a product/company/brand to a new audience. Publishing content on your own site is great, but if you don't have connections or an established audience, it can sometimes fall on deaf ears.
Guest blogging allows you to strike up that connection. Yes, you may get a link out of it as well that could be quite strong, but if you can get this new audience to revisit your site regularly and link to it directly, or share it on social media, then it's even better.
Have a look at active social media profiles and blogs that are prominent in your industry. Then look to create content that serves their community. Don't just go in and say "hey, I like your blog about shoes, I've got a guest post about the top 7 shoes here that you'll like" - that's just bad.
Instead, read through the blog, understand what the community are talking about and then make your approach. Your outreach then becomes something like "hey, I've noticed your members are confused about X, I'd love to produce an article/infographic etc. that helps explain X for them" or even "hey, I recently read this X article you published - I actually disagree and would like to offer a counter point of view - do you think your readers would be interested?"
You're on your way now to producing content that's specific to that target audience. If it's specific to them and it's well received, your dramatically increasing your chances of them visiting your site and hopefully sticking around once they see your existing content.
That to me is the value of guest blogging. Keep your best content to yourself, but create bespoke content for those that you want to attract.