You will be surprised bro.While that is true, it was also a limiting factor. Making warriorship hereditary / caste based was not a very smart thing to do historically. Many khatris were simply couch potatoes and had no real fighting skills. While many agrarian communities produced tough men but weren't elevated to leadership positions.
Now the system is more merit based.
In most of our villages, across India, and very predominantly in parts north, soldiering is a familial tradition.
Regardless of officer cadre which is more widely distributed and representative, our jawans all still come from very solid traditional pockets.