We have the ability to end homelessness, at least in more developed countries, but the people in charge would rather send the homeless to prison for daring to find a place to sleep. At least in the US, I don't know how other places handle the homeless.