>>513892529
As stupid as this post seems, there is some truth to it. In multiple cases I've heard the jury being instructed to the effect of "the prosecution does not need to provide a motive for the defendant's actions".
What the prosecution has to prove is that the defendant carried out the alleged act and did so with criminal intent.
Sometimes there can be a clear motive and it may benefit the prosecution to argue that the defendant had this motive. Sometimes the motive might not be so clear, in which case the defendant might in turn choose to try to justify their actions, or the question of motive might be left out entirely.