Several reasons, most of which have been covered above.
But the major reason is that unless there is a health/safety reason (like providing heat or running water), the government has no right to tell anyone how they build their home and what they put into it.
The market – private industry – can do that if it sells. So if a developer wants to build an ‘all solar community” – they can do so. But the government cannot force that to happen.
As someone else said, the local utilities have a role here too. Utilities are already making it difficult for people who have solar – the utilities are charging nuisance fees to make up for the lost revenue. So any sort of mandate for solar will have to also deal with power companies and their chicanery.
But the major problem with mandating solar is geography. Solar in Texas, Arizona, New Mexico makes good sense. Vermont, Ohio, Wisconsin… not so much.