The title is inaccurate and makes it sound like homeless can't be prosecuted for any small or petty crime. It seems biased in making the ruling seem ridiculous. That is not the case.
The ruling is hardly a huge win for civil liberties. It's pretty narrow and specific. A better title would be:
"States can't jail people for sleeping in public if there's no homeless shelters."
Of course such a title would seem reasonable and normal and wouldn't produce a click-bait news title that stokes the flames of national division.