A Biblical practice meaning someone is sanctified or set apart. There’s a great deal of information about what the practice signifies and symbolizes, but very little about any original reason for the practice. Things that are symbolic are usually rooted it some practical purpose, but I could find very little on this.
From an explainer at Bible Study Tools:
[…] oil often signified prosperity, blessings, and stability, opposed to other periods throughout Israel’s history where the harvest was not bountiful and famine had swept the land.
Oil had sanctifying (cleansing) properties. Whenever someone poured oil on someone or something, they had set apart that object as a blessed object of the Lord.