Like everything mechanical at the turn of the century, electricity was employed rather than people to do labor. For major commercial work, electric coffee grinders became a necessity. No longer was someone employed to sit around and grind coffee. Large amounts of coffee beans were poured in a hopper and the ground came out the bottom almost as fast as the coffee beans were poured in. Additionally, coffee grinding somewhat separated itself from spice grinding.
Spices are usually harder and damage the critical settings most coffee grinders have.
Large corporations were developed to roast and grind coffee. That and the tin can. Grocery stores all over the country were stocking tin can coffee. But like everything, things change. People got tired of the same taste all the time.