It's not cash, it's invested in to a position. Would you be more comfortable with it if instead of it saying you need to keep $10k cash in your account that you needed the full $40k? I mean if we took it from the perspective of how you seem to want it to work, then when you open that $40k position, then your cash balance would drop by $40k and your margin would be $0 and you seem to prefer having your cash balance reduced by $40k rather than "keeping $10k unused" in your account.
Think through this.
What actually happens: deposit cash of $50k with margin requirement of $10k for a $40k position -- you need to keep $10k cash in your account, meaning you could withdraw the remaining $40k if you wanted to or leave it in and get paid interest.
What you want to happen: deposit cash of $50k with a margin requirement of $0 for a $40k position, but in exchange for the $0 margin requirement, your cash balance is reduced by $40k to only $10k, meaning you could only withdraw $10k or get interest on it.
The way it's done is better for you, but you seem to be hung up on the meaning of "margin". Margin in its simplest form is simply cash that is locked up in order to keep a position opened and margin requirements are less than if you paid for the position outright (ie $10k margin vs $40k reduction in cash).