Well, it is kinda weird, lol. But on Bulbapedia here it says that the disk itself teaches the Pokemon that move. Pretty weird.
>The depiction of TMs has changed over time. In the TCG, they are shown as small boxes that the Poké Ball would be inserted into, but from FireRed and LeafGreen onwards, they have been depicted as discs that are inserted into the TM Case and the case itself teaches the Pokémon the move. -Bulbapedia
I guess there isn't an exact answer, but I think the TM case can teach the Pokemon.