every direct x version is totally separate from every other one. so if you want to play a game needing directx 9, then it has to be installed. same with directx 10, 11, 12 etc
it is "necessary" if you wish to play something that requires it.
that does not mean you have to seek out and install every version you can find. most game installers come with the needed version and can install it if it is not found already.