Mass killings provoke fear and anger. That anger results in a strong need to have someone in a power position do something — anything, but something — to prevent a recurrence of such tragedies. If a local clergy member or a person living near a mass shooting in a school or place of worship offers thought and prayers they are not criticized for it. But if the President or a Senator offers thoughts and prayers when they might have the power to “do something” but chose to do nothing they are seen as insincere.
Nobody fed by such anger goes further to ask “What, exactly, should I expect them to do?”, but they probably expect politicians to enact effective legislation for gun control of some unspecified kind. As well, when elected representatives are seen as accepting large donations from the NRA many people see all politicians as part of the problem rather than part of the solution, further questioning the sincerity of the offer of thoughts and prayers.