I'm not sure what to do about the Sims going behind the counter and helping themselves. But you could put a wall up around the staircase and then a door and click on the door and select lock for all but household. or something of the sort.
I haven't really played with the bakery. But that's what I do when I don't want Sims just roaming into the bedrooms of my Sims's house.
Something else that may help is putting up fencing and a gate. Lock gate for all but household.