In murder mystery novels, yes. In actual prosecutions? Not so much. They help at times. But, no, if the facts on the ground show someone committed the crime and mens rae can be demonstrated without explaining a motive, then motive can be set aside.
Since Oswald can reasonably be expected to know what would happen as he fired his rifle at the President, and since he then fled the scene (demonstrating a consciousness of guilt), mens rae at his trial would have been easily demonstrated. So as far as his guilt, his motive wouldn't need to be shown at trial.
I think the possibility of Oswald being hired or put up to the assassination by a conspiracy is rather low.
Sure, we can speculate on motive. He did it to get people to pay attention to him at last. He did it so people could only ever think of him passionately again (hat tip, "Assassins" . He did it because Kennedy was the human face of the bloodthirsty capitalistic United States, the enemy of Castro and the Marxist revolution. He did it to punish Marina for not coming back to him in the end. He did it because he thought Castro would let him into Cuba. He did it hoping that Kennedy's right wing enemies would get the blame. He did it to finally succeed at something in his sad, pathetic life. He did it to gain a national platform in his trial. He did it because everything in his life had prepared him for that moment.
He did it because he could.
That Oswald did it, easily shown. Why he did it, we'll never know for sure. And evil and good and good/evil people swept in and took advantage of JFK's death - of course they did. They always will when a powerful and influential man dies. But benefit is not evidence of guilt, not even when they are spectacular benefits. Guilt does not rest on knowing a motive.