At some point in the past two owners of the properties in questions got along, and an agreement was hatched. Such agreements are made as the deck-side owner is going to spend a bunch of money and needs legal protection from the other side just changing their mind.