Half and half cream already curdled in a fresh carton
If the date on your carton is more than four weeks out, the product is ultra-pasteurized and should definitely last more than a few days. As long as your refrigerator is not cold enough for the half and half to freeze, and you've not kept it out too long,  it's not likely that it's anything you have or haven't done.

That said, it's most probable that somewhere in the supply chain the product was not handled properly. But it's difficult to know where the breach occurred. 

It may have been kept out of refrigeration too long when a delivery occurred at a warehouse or store. Or a customer may have decided not to buy it and set it on a shelf to be discovered later and placed back in the cold case.

There are any number of things that can happen between production and purchase and, unfortunately, we have no control over them and have no way of knowing what actually occurred. 

I would definitely let your grocer know of the problem. He/she may be able to find and fix the problem if it's an ongoing issue.