It's easy to mess it up though. If you don't show up to appointments to the Jobcenter, they will give you less money. Suddenly you get 90% of the benefits (which is measured as minimum amount of money you need to survive per month). Do it again and you get only 60% for multiple months. Do it again, 30%. Still not showing up? They throw you out, including rent payments and health insurance.
Again, while I'm considered poor in the statistics, I'm not part of the group that's at risk of ending up without any benefits money or be homeless.
My city of about 260k population has over 900 homeless people according to the friendly volunteers of a homeless shelter. I know that because we sometimes bring food over to those places, if they're happy to accept it (not all of them do). That happens because I'm responsible for my town @ https://foodsharing.de/ - we rescue food from supermarkets that they'd throw into the bin otherwise. While being active there saves me some good cost of living, the amounts of food are huge and we have to distribute it too, mainly to homeless shelters in town.