It originally referred to a place where carriages were kept, and the meaning later expanded to include cars.