It's a false understanding of what war is to suppose there's a crisp distinction between "offensive" and "defensive" as used above. 

It's a trendy sort of supposition, but no person schooled in military matters gives that sort of silliness the time of day.

The military is a means to accomplish national will.   "DIME" is the acronym.

Diplomatic, Informational (propaganda, social media etc.), Military, Economic.  

Those are the main means that a country has at its disposal to pursue the good, or to rectify toward the good.   Not all means need to be used in order to accomplish the desired effect.   

We don't have to impose tariffs (Economic) in order to accomplish our objective in foreign policy.  The threat of our use of tariffs is often sufficient.   Weapons project strength of will whether used or not. 

All militaries need to have both offensive and defensive forms of warfare.   Very often the same capabilities, skills, and equipment used in one form is needed in another.