Why on earth is it illegal to have a grocery store closer than 15 minutes from your home?
However, the cities are arguing that dark stores aren't actually stores. You can't buy anything by going to them. The cities argue they are distribution centers. And distribution centers are not typically located in quiet residential areas.
If you read some prior discussions on this you'll find that in many cases the people operating them are disruptive to the neighborhood and really aggressive towards anybody who dares complain about it. So it gets escalated to the city and eventually they clamp down. As they should.