Oh, AS is certainly mentally ill though as you say not legally insane. He was aware enough to hide his crimes and to try to divert law enforcement.Good points.
I just think mental illness might be the problem here. Not legally insane as he placed the backpack in an area to throw off LE. So he had conscience of guilt.
But there are many people with mental illness that do not kill or commit crimes. It is still up in the air as to whether it is nature (genetics) or nuture (upbringing) that might trigger someone to become the monster that AS is. Our understanding of the depths of the human brain is so crude!