Hair conditioners

I believe they are massaged into the hair after the shampoo step. Apparently they replace essential oils into the hair which has been washed away by the shampoo soap.

So question is

If shampoo washes away oils then how do combined shampoo and conditioners work. Will the shampoo not wash away the conditioner as both are in the same bottle and applied at same time.

The conditioners in 2-in-1s are not great, and are chemically designed not to wash away with the application.