She was relieved to find no one there [in a church], because she hadn't formulated a coherent story as to why she was [there].
This is an example of not having to repeat an entire verb phrase in English. The idea is implied in the verb to be or for non-to be verbs by the helping verb. In the case of BE + at some place, the verb /was/ is used for /was there/
"He loved playing tennis but he didn't know if she did."
did= [if she loved playing tennis] = an example not using the verb /to be/
"She was spending a lot of time studying but didn't think her boyfriend was". WAS=spending a lot of time studying.
"They'd been having fun for weeks but thought their friends weren't.
weren't=weren't having fun
This is an important aspect of English to master if you want to speak it at a high level of competence.
as to means concerning or regarding.