That is easy to answer.
2D platformers have longer levels where the objective tends to be more "get to the end" so you can progress to the next stage. There can be more longer levels because developing 2D stages are cheaper.
3D platformers tend to have shorter levels where they have multiple objectives per stage. The objectives tend not to be "reach the end of the stage" oriented. Look at Mario 64/Sunshine/Galaxy as an example. 3D stages tend to be more expensive to develop, so they tend to re-use levels using differing objectives.
This is why Sonic games really didn't do as well as Mario did in 3D. Mario games adapted to the rising costs of 3D development. Sonic games tried to maintain the "reach the end of the stage" model in 3D and it didn't work as well.







