Mental Accounting vs Goals-Based Investing

This is a simple question, but one I haven’t quite gotten straight in my head yet.

So mental accounting is a cognitive bias that should be avoided. However, goals-based investing is an acceptable investing style where you pyramid your portfolio in layers to reach specific goals.

Why is one acceptable and the other is not? Both involve dividing your portfolio up in order to gain different exposure to different markets. Why is pyramiding your portfolio ok for goal-based but not ok for mental accounting?

I’m sure I’m missing something obvious here but I haven’t quite gotten this straight in my head yet.

goal-based accounting is to accomodate biases.

it does not set goals as to use bonus in high risk investments vs salary in low risk.

it actually uses investor’s goals i.e. absolutely necessary vs aspirational. (which is not mental accounting)

it then allocates amount of money based in what is required.

while mental accounting doesn’t care for goals… it says my salary is primary so use in safe investment… bonus is extra… so lets gamble.