Oswald was killed to shut him up. It’s an old Sicilian practice whereby they set someone up to take the fall for a murder and then kill him to stop the information flow. Ruby was tasked to kill Oswald by the mob which owned his strip club.
If they were worried about what he would reveal then why did they allow this? At any moment he could reveal who set him up. But he didn't. Why not?
Oswald met with the press, he was able to yell to them as he was being escorted at the police station, he talked to his wife, his mother, his brother and others.
If they needed to keep him silent then why allow all of that? It makes no sense to me.