YANBU.
It is wrong to give a girl with a baby her own flat, whether she is 16, 18, or 25!!
If someone in her situation is homeless and without any financial support, she should be offered a place with a family, in effect a "foster family", who will act as surrogate grandparents to the baby, and apply responsible house rules for the mother to follow - hence if she has left home because she doesn't like the rules and responsibilities her own parents impose on her, the alternative is to live in a home where she will similarly have rules & responsibilities, guidelines if you like.
That would benefit the baby, and indeed, benefit the young single mother (most of us know that life at home alone with a new baby can be very lonely).
Obviously, if she has the means to pay rent/bills for herself, then she is at liberty to get her own place.
My niece didn't like living at home with her mum & dad. She and her boyfriend decided to live together, altho neither had a job. They moved into a truly grotty house, shared with other (not folk they knew, just a group of people who needed extra help with the rent). Niece didn't like it (being used to rather more comfortable surroundings).
So she and BF decided to have a baby, because they knew that once they did, a flat would be provided by the state.
And it was. They have a flat, new cooker, new washer, new TV, and a baby girl, who, at 3 weeks old, was propped up in a corner of the sofa with her bottle to feed herself, because her mum can't be bothered.
The childs father has said that he "might look for some gardening work soon" (cos as we all know, there is lots of gardening work available in the uk thru Nov, Dec, Jan ....).