It is only supposed to fire its rocket when it intercepts an aircraft. Not necessarily when it is attacked by an aircraft, it'll just default to its rangedstrike/rangedhurt kfs, but when it intercepts ones. I have literally never seen this happen in game though. Probably because I never use SAM infantry due to them being weaker than base infantry which come earlier. At any rate if you wanted the Sam Infantry to only use its SAM in combat you could just copy all of the anti-air kfs and rename them to ranged. For instance saminfantry_md_anti-air_idle would become saminfantry_md_ranged_idle saminfantry_md_anti-airfortify would become saminfantry_md_rangedfortify and so on and so forth.