Can they check my bag legally? At work

Recently my work place have started checking bags before we leave for the night. I work at a department store . They are random bag checks. I don’t have anything to hide but I don’t feel like it’s fair we have to have our bag checked like we are criminals . Legally are they allowed to do this?