Lots of reasons contribute.
Most persistent homeless are dealing with some combination of substance abuse and/or mental illness that keeps them homeless. Inner cities have more people, so even if we assumes that some fixed percentage of people would be homeless, cities would have more.
But the percentage isn’t fixed. Cities have anonymity. When you beg for money in a rural place where everyone recognizes you as the same guy they gave to yesterday, they quickly start to feel like you’re taking advantage of them and are less likely to give money. In a city, this effect isn’t zero…but it’s lower.
Cities have higher cost of living, so it’s easier to find yourself being evicted. You’ve probably got easier access to your drug of choice being just a short walk away whereas rurally, everything’s further away…even your drugs (though don’t be fooled, rural communities have thriving drug trades in most cases).
Cities are also more likely to be large and you get a sort of ‘not my problem’ effect. As long as the homeless stay out of the well-to-do areas, those well-off voters will continue voting for policies that they think are kind but actually create the problem, like anti-development policies (which keep prices high), or rules against public camping and indecency being relaxed because it’s more humane (as long as it’s not in ‘my backyard’) which encourages it over going to shelters or participating in programs that might help in longer term way.
Cities are also more likely to respond with impersonal social programs, whereas rural efforts are likely to be more community based. It’s harder to look someone in the eye that you know is sacrificing to help you than it is to look a social worker who’s just working for the government. Not bashing on social workers, just saying it’s easier to just view them as cogs in the system than it is a local priest for example.
A person who goes homeless in a rural area is likely FROM that rural area. They therefore have local friends and family who are likely to intervene to prevent the homelessness. Someone in a city, may or may not be from that city or from that PART of the city. It’s easier to fall through the cracks.
By no means is my list likely to exhaustive.