@Lunelli_98 The Road to Rome and Secret Weapons of WWII were never available via digital download (thus disc keys could never be redeemed for them). The only reason the base game is available for digital download is because it was added to Origin in November 2012 in celebration of the franchise's ten year anniversary, and that was first time the game had been available for digital download from EA.
Quoted from Battlefield.com-
"Battlefield is celebrating its 10th Anniversary. Now available on Origin as a digital download for the first time, experience Battlefield 1942, the game that started it all."
Q: "Does this free digital download version include any of the expansion packs originally released for Battlefield 1942 (The Road to Rome and Secret Weapons of WWII)?"
A: "No."
I was, however, able to use the expansions with my Origin version by installing them from disc (technically, I installed them from ISO image backups I made back when I still had an optical drive). I remember that the disc installer from the World War II Anthology refused to install the expansions separately from the base game (probably due to a missing registry entry, but I didn't investigate it, so I'm not certain), so I installed the base game and two expansions from the discs/ISO images first, then I installed the Origin version of the base game to the same install path (in my case, I chose to install the disc versions to Program Files (x86)\Origin Games\Battlefield 1942 for the sake of uniformity/organization, which is the default install path for the Origin version), overwriting the disc version of the base game. The Origin version then worked with the already installed expansions. I don't remember this configuration causing me any issues when later uninstalling the game; if there were any hiccups when uninstalling, they weren't notable enough for me to remember them.