Breast feeding/bottle feeding

Why is it ok for a mom to breastfeed, because it provides comfort to their child from ages 2 and up. But if a mother was to hand their baby a bottle to comfort them at that age. It’s frowned upon?? 🤔🙄