The reason is in the first section here:
https://www.hedgehogcentral.com/bedding.shtml
Basically, cedar might be dangerous from a respiratory standpoint, and pine is toxic unless properly treated, which wood for a cage likely won't be.
It's much safer to just avoid both.