The government knew that if John F. Kennedy wasn't eliminated, then the Viet Nam "police action" would never have happened, and several govt. contractors would go completely broke, and their would have been no protection for the oil companies who were "wildcatting" for oil in the area at the time.
Kennedy was killed in the classic "triangulation of fire" using 3 different expert rifleman, who were most likely hired by the C.I.A.
Someone had to be sacrificed, to take the blame for the assassination, and Lee Oswald was the perfect candidate. He had recently defected from the USA and then returned to Texas with his new russian bride. At the time, the majority of the American public were foolish enough to believe any story that the government perpetuated, no matter how absurd.