Why did Jacob place a stone, pour oil on it, and set it up as a pillar?

Genesis 28:18 - 19

ESV - 18 So early in the morning Jacob took the stone that he had put under his head and set it up for a pillar and poured oil on the top of it.
19 He called the name of that place Bethel, but the name of the city was Luz at the first.