Law covers many many fields, and we treat all of them differently. Just because multiple notions are covered by law does not mean we treat them the same.
Maybe we even treated some of them the same but certainly not today.
I would argue that, at least from some points of view, in the past, marriage was treated similarly to physical property. Thankfully we no longer do so.