I think doors that swing inwards are more common in most countries I've been. I think the reason is mostly security: if the hinges are on the outside it's very easy to remove the door...
Although it's probably still less effort for a robber to just break a window in most cases, so probably not always for security but rather started as a security measure and then people just got used to it...