SMZ:
The alternate form's stats are copied because the alternate form began with the stats corresponding to that form rather than to its original form. However, it is actually incorrect, in generation 5, to say that Transform "copies" the other Pokemon's "Shininess" and form, as effects that would check those attributes check the original form, not those of the opponent.
Such is the case, for example, with Illusion: the bearer of Illusion, as it becomes active, has only "all attributes necessary to make it appear as though it were the last listed ... Pokémon" controlled by its owner. Illusion doesn't "copy" any attributes of the latter Pokémon, but the bearer of Illusion has only its appearance: effects still check the actual attributes of Illusion's bearer.
The same applies to Transform. After Transform is used, the user has "all attributes necessary to make it appear as though it were" the opponent, whereby here, however, certain things about the opponent are copied and become the user's, namely the opponent's "Attack, Defense, Speed, Special Attack, and Special Defense stats; types; moves; weight; Ability; and stat stages". Note that form and "Shininess" are absent: this suggests that both are part of the opponent's "appearance" and are not checked by any effects.