We outlaw homelessness because we don't want homeless people on the streets littering the place.
The bad behaviours you want to be outlawed are in fact already outlawed. It's just super hard to catch and convict on those. While it's a lot easier to prove someone is sleeping rough.