I'm absolutely certain that the abandoned houses are abandoned because they are literally not saleable. Even perfectly good houses that were built in the last 20 or 30 years sit on the housing market in my area for years before they even get a single offer. Houses that cost $300K end up selling for around half that price, even after waiting for years to sell it. That's how non-existent the used housing market is in Japan.
And this is not to say that housing is flat. Empty lots sell relatively quickly. Nobody wants a used house. That's the reality of the market.
I don't know exactly what this programme is, but I would venture to guess that they will give you the house/land as long as you knock down the existing house and build a new one. This will cost you the aforementioned $300K, at which point you can flip it for $150K. That's how they mitigate that possibility :-)