Well I don't know how high security the schools were you people went to, but getting into my old school was not really a problem. The doors were always open during the day and I guess if you're about same aged as the regul.ar students you'll blend. That school even accepted outsiders. We had this great basketball court within schoolgrounds a lot of teens from around town (so also students that didn't go to that school)hung out on. At our school, according to the teachers, you could even tell the actual students from outsiders....with those 3 different school kinds we have in Germany the kind I went to is usually seen as upper class, while the Hauptschule, for instance (that was 5 minutes away from our school, so they came there a lot), is rather low class with a lot of immigrants. And apparently you can really tell what school somebody goes to just form the way they speak and what they wear.
So yea, summing up, at least at my school it was totally not a problem to get into a school you don't attend, and even if the authority figures knew about that, they didn't make a big deal out of it.
So I'm guessing it was similar in Sunnydale?