The circumstances, including who JFK was and the number of people and organizations who detested him (as well as who Oswald was, as well as the chaos of Dealey Plaza), made this an almost perfect storm for conspiracy theories.
That's why it's the ultimate murder mystery - Agatha Christie on steroids.
The single most obvious thing they could have done was keep Oswald alive to stand trial. That should not have been difficult.
(I never see this discussed, but for a few years I was into handguns and discussions of "stopping power" and whatnot. The odds of one shot from a .38 with 1963-era ammunition killing someone would be extremely iffy. It can happen and in Oswald's case obviously did, but if Ruby's effort was some kind of planned hit it was an exceedingly chancy one. The odds of surviving one shot from a .38, especially in the circumstances in which Ruby fired it, would be pretty good.)