Regardless of when the law was created, the questions asked in the OP remain valid.
I don’t see how, even if one sees benefit in prayer. People can pray with or without this national prayer day, and hence get any benefit they get from prayer regardless of this day being declared. I grew up with a very religious family, and never once did they ever even mention this day, to my recollection. And these folks are the biggest fans of prayer you can imagine.
I am an atheist, and I consider this like all the other blatant violations of separations of church and state, like ‘In God We trust’ on the money and pledging allegiance with ‘one nation under God’. These issues only exist these days as battle points for politicians to whip up their religious followers against the godless heathens.
I cannot really imagine a truly clear-thinking intelligent religious person seeing a true non-political need for this stuff.