Not all true..Algeria, in the beginning was replacing the old, overused military equipment.It never had Morocco in mind..it is still true to this day. For Morocco your statement has some truth to it , it’s for parity and to give themselves an offensive capability for their colonialist dream to repossess lands they claim to be Moroccan . Their desire to repossess them has not led up since they acquire there autonomy from France..Swath of lands Algeria, to Mali via Mauritania all the way to Senegal are claimed as theirs since the times of times. There is no historical facts to their claims.
A Moroccan parity to Algeria is just a far fledged dream and hard to attain with the actual conditions be it economical, political or otherwise. The Moroccan armed forces are still not efficient and equipped enough to face Algeria.
Egypt since the advent of Sissi has changed considerably , they became a potent force in the true modern army sense but still lack operability projections to match that of Algeria.