If you don't understand how to manipulate matrices in Maya, have a look at this post first:
https://rigjuice.blogspot.com/2021/08/important-math-matrices.html
A big chunk of how matrices are useful in Maya is in achieving constraint like effects without heavy constraint nodes.
Let's talk about how the actual effects of constraints are uniquely useful over direct connection.
When trying to get an object to follow another, there is often a lot of messy context and complication that means a direct connection just won't cut it. If two hierarchies are spatially identical then direct connections from members of one to members of the other would usually be enough. But what if the hierarchies don't match? Perhaps you need a joint to follow the orientation of a control but the orientation of said control isn't coming form just that control's rotate values? Perhaps the parent above that control is also rotating, and maybe that parent has a different pivot position than the control, so you've gotta do a bunch of trigonometry to figure out how much rotation of that parent ends up being how much shift in the orientation of the control, and then add that to the rotation coming directly from that control with some math nodes and then who knows what else!
Or you can throw up your hands and say "Orient constraint!" [mic drop]
Such a shame there's no other way when things get that complicated...
Oh wait. Matrices.
This is super handy and I want to make sure nobody gets left behind, so I'll take it one step at a time.
Let's make a cube and... I dunno, a locator.