There is no one religion in India. People of minorities may not be comfortable going to a temple. Also, langars and temple food is pro bono and excellent volunteer work. It's not supposed to be relied upon to feed people below the poverty line.
[0]: https://www.outlookindia.com/website/story/legendary-singer-...
Each temple have their own tradition and they have the right to their own tradition. Now, allowing a non-devotee into the temple is their business. But that doesn't mean, one cannot find any temple anywhere.
Hence the need for the government to step in and help out the hungry, instead of leaving it to temples, etc.
(Like I said, I don't necessarily disagree with who the temples choose to let in.)