They questioned him because he was in the UCLA library after 11pm and wouldnt show his student ID. The library closes at 11pm, but apparently they let people with valid UCLA ID remain afterwards.
These types of checks became standard after the large number of sexual assaults, laptop thefts, and other crime on campus by people who didnt belong there.
from UCLA.com
Non-Residential Buildings
Most University facilities are open to the public during the day and evening hours when classes are in session and events are occurring. During other times, University buildings are generally locked and only faculty, staff and authorized students are admitted. To ensure building access is possible for only authorized individuals, it is essential that students, staff and faculty work together to keep the doors closed after hours. Do not leave doors propped open or unlocked after hours. Do not open the door for unfamiliar individuals. Remember, if your campus keys/access cards are lost or stolen, report the loss immediately to the issuing party.