Stan was banned from New Jersey, but it's not crossed off on the map of states he's banned from.
When Dipper enters the code into the snack machine, he enters "1ABC3". But in the flashback, Stanley enters "AB1C3". However, that just means that there's no fixed order to the code and the machine will move as long as you press all five buttons.