Stalin had no military sence, like most politicians.
His reason for purging the red army was the same reason he purged the communist party, he didn't trust his own generals. So he replaced them with men he trusted. This could certainly be seen as a first step towards launching war.