The reason for that is because of diplomacy. Zelda's lullaby is the theme of the Royal Family of Hyrule. When the races hear it, they would imagine it is played by a messager who has delivered a message from the king or queen of Hyrule.
I must confess, though, when I had first learned about how the signs can be restored by playing Zelda's Lullaby in front of it, I just starting fun hacking and slashing the signs only to safely bring them back up to their original, undestroyed state. Zelda's theme, however, has been featured in just about every game since A Link to the Past, including Phantom Hourglass and Spirit Tracks.