Why are hot dogs sold in packages of 10 but hot dog buns sold in packages of 8?

And,

Why do 24 hour gas stations have locks on their doors?