There is no sentient Agency running the Matrix. The Matrix is a quasi-intelligent ordering system. It doesn’t need any motivated intent, just Universal constant values and mathematical functions.
Cause <—> Effect
Input —> Function —> Output.

Schematic depiction of a function described metaphorically as a “machine” or “black box” that for each input yields a corresponding output
Function (mathematics) - Wikipedia
It is really not that complicated. Max Tegmark posits some 31 relational values and a dozen or so equations are all that is needed to make the Universe “functional”.