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.