Cereal

My baby is 6 weeks old and her pediatrician told me to give her cereal in her bottle because she spits up a lot ....why do so many people say not to give their baby cereal if the pediatrician says it’s ok ?