I heard that it was in reference to people heading to the beach on the train 100 years ago.. They used to put their lunches in Shoe boxes. The term originated from that. It would frustrate the business owners who sold food.
Now it is just a general term for non-locals.