Easy. The purpose of the 1st Amendment is NOT to stop government from doing anything with a religious purpose, but rather to stop actions that have sectarian religious purposes, that is, actions that favor one sect over others.
Taken literally, the Lemon test would ban the pledge of allegance, the motto printed on our currency, and would even demand acts like closing the national Cathdral, stopping the daily congressional invocation, and firing of the congressional chaplain. Given that the founders had all these things, it's pretty hard to argue that the founders had the Lemon Test in mind when drafting the 1st Amendment.
Prong two says that the principal or primary effect of the state action must be one that neither advances nor inhibits religion.
It's hard to argue any of the above things don't have the primary effect of advancing religion.
Will the Supreme Court strike that down?
Yes, because to uphold it would have absurd legal implications for which the public would not stand.
I definitely see some wiggle room in the future. But not in this Dover case. ID has no secular purpose (except fund-raising, book sales, legal fees, etc
I think a better argument against ID is that it's sectarian.
Actually the argument is that they indeed do not advance religion since it's only Ceremonial Deism which is not unconstitutional.