In its most basic way of describing it…
To grow you need to be in a caloric surplus so that the body has something to grow with. Energy cannot be created or destroyed and is instead transferred. So your body uses the surplus energy to grow.
To lose weight you need to be in a deficit. So that your body converts stored adipose tissue into useable energy to make up for said deficit.
Now when you’re bulking (assuming you’re drug free) a modest surplus of 300-500kcal is sufficient. People going super crazy high calories are just going to put in more fat mass and have to cut for longer.
For bodybuilders 1.8-2.2g of protein per lb of body weight is consumed.