There is the brutal reality that the climate in Finland and being homeless are not a great combination in the winter. And the summers are short. Getting people off the streets saves lives. If it's -20 during the night you can either lock people up or collect their corpses in the morning. Most people will seek shelter by themselves or not reject shelter when it is offered to them. But people with serious psychiatric issues, that are maybe a bit self destructive and under the influence of alcohol or drugs are going to have trouble doing rational things. So, yes, Finland does the pragmatic thing here. I don't have good statistics on this but I bet there are more than few corpses being collected in the US and the UK on a yearly basis.
I've lived in Finland for a few years. It's a friendly place that is mostly safe and nice to be. There's a level of pragmatism and compassion with much of what they do that other countries could learn from. Including the business of incarcerating people. The US and UK are maybe a bit lacking with that. Finland has prisons and psychiatric wards (not the same thing) of course. But people don't stay in those endlessly. Prison sentences are generally short, and rehabilitation is something they put a lot of effort on. Most crime there relates to people doing stupid shit because they are drunk, mentally ill, etc. The solution usually includes addressing those issues after they serve their shortish prison terms. And with some level of success.