Someone literally asked the same question a few years ago on Reddit.
Basically, there's no real 2D environment in Unity. It's the same 3D engine but with a different perspective (to this day, it seems that Unity still doesn't have a true 2D environment). Also, the Parallax effect (the 'moving backgrounds') it's easier to achieve on a 3D scene due to the depth (Z axis).
Edit: Oh, forgot about your other question, oops!
when do I use 3d unity and when do I use 2d?
Again, there's no difference in the way Unity renders your game, however, there IS a difference in the components you use in your game. By components, I mean: colliders, physics, camera settings, etc.
Basically, if you're going to make a 2D game, choose 2D mode (even though the game will be rendered as 3D). 2D components are optimized for, well, 2D. If you're going to a 3D game, then choose 3D.
In fact, these modes (3D and 2D) are just pre-configured settings for different environments. This means that you could create a 3D project, and turn it to 2D if you wanted to, or vice versa.