If you look at the Shimano compatibility docs, the Alivio shift levers SL-M4000 are compatible with both the MTB RD/FD-M4000 and trekking RD/FD-T4000 versions of the derailleurs, so there is functionally no difference between the M and T versions.
Compatibility charts are here:
Shimano used a common derailleur actuation ratio for MTB up to 9 speed and road up to 10 speed, so I'm not surprised that the Sora drop bar shifters work with Alivio derailleurs.
if you want to fit Alivio cranks and derailleurs to a frame that is nominally a road bike you have to be aware of crank spacing, bottom bracket shell width and chainline (and what bottom bracket type you have.) The Alivio cranks want a MTB style Hollowtech BB that fits 73mm (or 68mm with spacers) shells, and provides a 50mm chainline.
Specs are here: <