Students aren't allowed to bring certain things onto school property. Just like how administration is allowed to search book bags and lockers, they have the right to search students cars. Schools have a right to routine searches to ensure school safety. It's not a violation of privacy once it gets on school grounds
This is of course assuming probable cause. No one should just be able to do it just to do it.
The Fourth Amendment does not apply to car due to the motor vehicle exception. However, the motor vehicle exception states that the officer conducting the search must have probable cause to do so. When schools are carrying out searches, they should not be able to search every car as just a routine search without probable cause. Without a valid reason to search students' cars, it become a violation of rights.