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
Yup, I can’t recall if it was a Rivet Joint or Cobra Ball (recce 707) that the Sovs thought it was.
The USAF was flying highly aggressive mission profiles, actively trying to get the Sovs to respond (but not to the point of a shootdown) this revealing their capabilities. Remember that this was the same time the USN was sending special missions subs deep into Sov territory to tap underwater comma cables.