A teenage girl accused of the attempted murder of two teachers and a pupil took a knife to school "every day" because she was "anxious" and "scared", a trial has heard.