I'm just not really getting what changed. Was it something the Romans started when they worshipped him as Mercury?
Hermes was always associated with magic. He's featured in our very earliest Attic curse tablets and even in Homer he's connected to witchcraft--he gives Odysseus the magical drug moly. The connection, especially in curse tablets and other binding spells, is not at all unexpected. Hermes is a chthonic deity by virtue of his aspect as Hermes Psychopompus, and like other chthonic deities his invocation in magical formulas is not unusual. In later times Hermes, due to his association with Thoth and the increased syncretism of the Hellenistic world, became even more associated with magic, and in particular with the transmission of magical texts, but he was always a mystical force--as early as Homer Hermes is the guy who has all this secretive knowledge, which he might or might not tell you about