What was the primary reason for the invention of basketball?

(James Naismith) - The Innventor Needed an indoor activity for the winter... which was BASKETBALL! :)