By every indication purchased legally, since she had no prior police record, nor any interactions with authorities. Whatever treatment she was receiving for depression or suicidal ideation was strictly known within the family. Apparently she never threatened anyone. Her parents told her to get rid of her guns, and she promptly hid them until the day of the shooting. She even made a point of purchasing each gun from a different gun shop to avoid any suspicion.
This was about as unforeseeable an event as law enforcement will ever encounter. The one good change that will result from this incident is that schools and churches that haven't done so will quickly upgrade their doors. If Covenant had installed reinforced mesh glass doors, she could have blown out the glass and set off an alarm, but the police would have arrived before she ever got into the building.
Reports also indicate that she considered at least one other target, but decided against it due to its better security. Covenant was a very soft target, with no security officer, and she was familiar with the layout.