That was a function of the Soviet air defense command system: the pilots were trained to do what the ground controllers told them to. The ground controllers who couldnt see the plane didn’t believe that it was a civilian. The pilot(s) who could see it couldn’t disobey the instructions they rec’d from the controllers.
as I recall, the Soviets were paranoid about civilian airliners being used as spy platforms
especially since they did that themselves
In their eyes, KAL-007 was a spy plane on a military mission and thus a valid target
I had a friend who was at a listening post close to that disaster while it was going down, and he was shaken by what happened, even years later