It's complicated for several reasons.
First, at least in my state, it's not split "50/50", it's split "equitably" - which is open to interpretation. Equitably might mean 50/50 in one person's opinion and 75/25 in another's.
Second, assets acquired prior to marriage are not split - they belong to the original owner. So if some of the money in that 401k or house predates the marriage - that amount of money PLUS any money made off that money belongs to the original owner. It can be VERY complicated to split up a 401k.
I went through this in my own divorce, although we were able to figure it out without lawyering up. My ex wanted to sell our house and split the proceeds and also split the 401k in half - similar to your friend. However, it costs tens of thousands in fees to sell a house, and many thousands to split a 401k, because it requires complicated accounting. I thought this was a waste of money.
I wanted to keep the house and live in it (only about 80k in equity in the house) and let him keep the 401k (120k). Money-wise he came out on top with my strategy, but he didn't want to do this because he wanted the immediate cash from the sale of the house. Eventually he saw my point of view.
I was surpised how even "simple" divorces can be quite complicated.