Summary/TLDR
From court documents it's clear that the primary purpose of a similar
technique used by Sega starting at least as early as 1988 (released
while the Game Boy was still under development) was to use trademark
law to stop distribution of original games by other developers without
a license from the console manufacturer. Nintendo had been dealing
with the same problems, possibly for longer than Sega had, and no
doubt had lawyers and managers who were just as smart and competent,
so it's likely they did it for the same reasons.
Sega's TMSS and its Purpose
As mentioned by Kaz in a comment, in 1990 (a year after the
release of the GameBoy) Sega started doing the same thing with their
TradeMark Security System on the Genesis III. This was a great
clue, as it turns out to lead to fairly compelling evidence about why
they did this.
According to 977 F. 2d 1510 - Sega Enterprises Ltd v. Accolade
Inc ¶6:
...Sega had grown concerned about the rise of software and hardware
piracy in Taiwan and other Southeast Asian countries to which it
exported its products. Taiwan is not a signatory to the Berne
Convention and does not recognize foreign copyrights. Taiwan does
allow prosecution of trademark counterfeiters. However, the
counterfeiters had discovered how to modify Sega's game programs to
blank out the screen display of Sega's trademark before repackaging
and reselling the games as their own.
It's made clear in ¶79 that this was a conscious and explicit decision
by Sega:
...Sega officials testified that Sega incorporated the TMSS into the
Genesis console, known in Asia as the Mega-Drive, in order to lay
the groundwork for the trademark prosecution of software pirates who
sell counterfeit cartridges in Taiwan and South Korea, as well as in
the United States.
It seems also that the system had been designed and implemented in
cartridges before the first release of the Genesis system in 1988, as
would obviously have been necessary if the old cartridges were to work
in the Genesis III. ¶8:
During the reverse engineering process, Accolade engineers had
discovered a small segment of code—the TMSS initialization code—that
was included in the "power-up" sequence of every Sega game, but that
had no identifiable function. The games would operate on the
original Genesis console even if the code segment was removed.
(Accolade instructed their developers to include this initialization
code in all their games, too, though at the time they didn't know the
purpose of it, and all their ran fine on the Genesis III except for
one, Onslaught, where the developer didn't do this right.)
While this is in Taiwan solving a much more serious problem than
unlicensed cartridges from other software developers—copyright
couldn't protect direct copies of the vendors' original games—SEGA at
least admitted that this was intended to be used in the U.S. as well
(see above), where it wasn't necessary to protect Sega's first-party
game cartridges as they were already well protected by copyright.
Nintendo had to deal with the same IP issues for home video game
consoles as Sega did, and had possibly been dealing with them for
longer. The NES, released in 1985 (three years before the Genesis) had
already implemented technical measures to prevent use of unlicensed
cartridges, probably due to bad experience with the lack of a lockout
system in the Famicom.
Nintendo's lawyers and managers were doubtless as smart and competent
as Sega's, so it's no surprise that they might come up with a similar
solution to the problem. Nintendo's solution might even be legally
slightly stronger than Sega's solution because rather than just a
short code (SEGA
) in the cartridge triggering trademark display, the
actual trademarked image was in the cartridge.
Actual Effectiveness of the Measure
It would be interesting to know if this was ever tested in Taiwanese
courts. A few years later Sega sued an infringer in the United
States where this was brought up as part of the case, but on appeal it
was found allowable for third parties to trigger the trademark display
where necessary for compatibility ¶1:
The question is whether the computer manufacturer may enjoin
competing cartridge manufacturers from gaining access to its
computers through the use of the code on the ground that such use
will result in the display of a "false" trademark. Again, our
holding is based on the public policies underlying the statute. We
hold that when there is no other method of access to the computer
that is known or readily available to rival cartridge manufacturers,
the use of the initialization code by a rival does not violate the
[Lanham Trademark] Act even though that use triggers a misleading
trademark display.
The more detailed reasoning given in ¶73 et seq. makes it really
clear that it's Sega's fault the trademark was displayed when
Accolade's game was started and it was entirely on Sega to fix this.
Because the TMSS has the effect of regulating access to the Genesis
III console, and because there is no indication in the record of any
public or industry awareness of any feasible alternate method of
gaining access to the Genesis III, we hold that Sega is primarily
responsible for any resultant confusion.
...while it may not have been Sega's ultimate goal to mislabel
Accolade's products, the record is clear that the false labeling was
the result of a deliberate decision on the part of Sega to include
in the Genesis III a device which would both limit general access
and cause false labeling. [This] compels us to place primary
responsibility for consumer confusion squarely on Sega.
This is a slightly different situation from the Nintendo Game Boy one,
since, as noted above, the Game Boy carts must actually contain the
trademark, rather than just triggering display of it. But the
principle seems to me to hold: the actual display of the trademark is
done by Nintendo code, having the correct material on the cartridge to
trigger that is necessary for the game to play, and were it not for
Nintendo's code the end user wouldn't be seeing Nintendo's trademark.
As a side note, Accolade had also needed to disassemble and
reverse-engineer Sega games to figure out how to overcomes TMSS, and
this involved making (internal) copies of the code. This was found to
be legal as a fair use when no other means could serve to understand
the (non-copyrightable) functionality of the program (¶31 et seq.,
ibid.), consistent with the earlier Atari Games Corp. v.
Nintendo of America Inc suit. (Atari lost that one not because
of their reverse-engineering, but because of copyright violations due
to also copying original Nintendo source code.)
This and various other comments in the decision make it pretty clear
that the judge felt (at that point in time) that it was perfectly
legal to do whatever you needed to do to make your software run on any
computer you liked. Ah; the good old days; new legislation would
change that before the end of the decade.
Current Day
All this is probably purely historical now.
The above decision regarding use of trademarks when required to run
software on a computer probably no longer holds in this age of the
DMCA where that check would be argued to be an "effective
technological measure" restricting use of the computer.
Taiwan (as "Chinese Taipei") became a signatory to the Berne
convention on 2002-01-01.