Grammatically it is a passive construction.
Yes, exactly!
The objective meaning of "мы получаем прибыль" and "у нас получается прибыль" is the same. But psychologically, "у нас получается прибыль" is more like "the profit appears by itself", so it is perceived as the actor (мы) is moved away and does not control the action.
So, you calculate "income minus expense", and the profit appears to you! That's the logic of the passive construction.