It does matter whose name a property is in.
A sole owner can deal with the property without the permission of the non legal owner.
If there is a divorce then courts can make orders for property held by one party. However, Just because they can make an order doesn't mean they will.