Well, in the flashback shown in "Call of the Primitives", when we see Unicron rebel against his creators, we see an object that very much looks like the Matrix rising out of the destroyed body of Primacron's assistant (referred to by the episode's dialogue script as "Oracle").
Nothing has ever really been disclosed about whether this object really was the Matrix or not (outside of later retcons made by outside party unaffiliated with the episode's original creators), but the fact that it does look to be the Matrix had led to endless speculation over the years.
If we're strictly going by just TFTM and "Call of the Primitives" as they were and without anything else said by later fiction made by other parties, then all we really have to go on is just the speculation because, admittedly, we really don't know the true answers behind the history of Unicron and the Matrix as originally presented by that movie and that episode alone.
If the object that rose out of the assistant's body really was the Matrix, then perhaps the reason Unicron lashed out at him and Primacron was in attempt to destroy the Matrix within the assistant's body. Maybe it was originally a fail-safe invented by Primacron and/or the assistant just in case Unicron went rogue and got out of hand.
Were that the case, how, then, the Matrix came to later be both a fount for the "Wisdom of the Ages" and a symbol of leadership for the Autobots is unknown. Not to mention the prophecy of the Matrix choosing an Autobot to be its Chosen One who will use the Matrix to "light our darkest hour" is likewise an unknown when going by the Primacron backstory.
There's just a lot of unknowns here that were never really explored by the movie and cartoon, which were only really fleshed out by other unrelated media that tried to make sense out of it all (namely by connecting everything to Primus). But if we're discarding all of that Primus stuff, then we're simply left to our own imaginations to figure out all that the movie and cartoon didn't bother to explain.
Maybe there's some missing info in the full script for "Call of the Primitives", but as of this typing, said script has yet to be found (only the dialogue script has been found), so we're out of luck on that.