Apparently the first doggie bags were used in San Francisco during WWII to prevent food waste, then spread around the country under different names such as Snack-Sac and Doggie Pak.
29 June 1943, Associated Press:
SAN FRANCISCO – The newest device of the Society For Prevention of Cruelty to Animals:
The Pet Pakit.
It’s a carton cafe owners give to patrons on request. The diner scrapes leftovers from his plate into the box, to take home to his pet.
It was considered uncouth to take home restaurant leftovers for anyone but Boswer in most restaurants until the 1970s. And some upscale places still discourage the practice.