Once every one used a solid soap bar to wash their hair and it did a great job, then someone made a "better" product called shampoo (actually a detergent), gave it lots of marketing, added a conditioner and all of a sudden it cost more to wash your hair and was not as good.
Sounds a bit like the history of shaving.
However the main reason that shampoo overtook soap for washing hair was because the soap manufacturers removed the glycerin (which they sold as conditioner) and replaced it with fillers and binders and the resulting soap left your hair a mess.
Most cold and probably hot processed soaps will work as a good shampoo because the glycerin is retained (which acts as a conditioner) in the bar and there are no fillers to cling like scum to your hair.
For shampoo you need a mild soap as you do not want to strip away too much of the natural oils, but still remove dust and dirt, Castile (olive oil) soap is considered the mildest, and with the addition of castor oil it foams better and adds a bit of shine. So our shampoo bars are and 80/20 mix of olive and castor oils and we have had enough feedback over the past 18 years to convince us that we got this mix right.