Milk doesn't go bad that quick. The store should have milk with a
best buy date of at least a week but generally more. I bought a gallon of 2% at our kroger chain this past Sat that's best buy date is the 12th, that's 10 days and it's good or a few days past that. There's also weeks where the 1/2 gallons are on sale and 2 are less than buying 1 gallon, Walmarts not going to do that.
It's really a better option to look at your local grocery ads and see where the sales are or even price match what you buy at Walmart and a grocery store. The grocery stores will also have coupons in their app to help save. I've saved almost $175 so far this year and that's mostly buying for 1 person plus I save a dollar on every gallon of gas on one fill up a month which is over 10 bucks. I only fill up once a month and get most of the fuel points from buying gift cards.
I generally stick with our kroger chain, but we also only have 2 options of major chains here. I shop at Safeway solely when they have something I need on a good sale. Or when we want cake by the slice, they have a better bakery.
There's lots of ways to save money on groceries if you take a bit of time to figure out who has better prices and then like 10 to 20 min to look at the ads and the coupons on the app each week when doing your list.