Your scalp produces sebum regularly, which traps dirt and debris, if left uncleansed, these can lead to infections. Once you have an infection, you'll need to see a dermatologist to assess and remove what is usually a fungal issue, or it can lead to hair loss.
How fast you produce oils and need to wash is primarily determined by hair length, density, and thickness of texture.
More frequently than 5 days is typically recommended.
Shampoo is for scalp health, less for hair.
#hairtipsfromapro
Because the scalp produces sebum regularly which is a kind of oil, your shampoo requires a detergent which activates with water to break down that oil so that it can mix with water and rinse away.
These can include "sulfates" as well as other cleansing agents.
Shampoo should be rinsed and repeated with focus on the scalp until its effectively clean, and all the oils are removed.
Typically clean wet hair has an almost squeaky, rubbery feel.