In relation to the environment their ancestors endured, why was the Japanese Spitz bred to be a medium-sized dog?

Answer

To be small enough to live comfortably in urban or suburban settings

They were bred to be medium-sized—large enough to be substantial but small enough to live comfortably in modern, less agrarian, urban or suburban settings.

In relation to the environment their ancestors endured, why was the Japanese Spitz bred to be a medium-sized dog?
Dogbreedspitz