It's not illegal to let your underage teenage child to drink at home though. You can let your own children drink at home between the ages of 5-16, it's not illegal.
OP was well within their right to buy alcohol with their daughter with them, it doesn't matter if OP planned on letting her drink some that evening.
On a side note, this year I was IDd in a Tesco when my mum was buying some wine. I'm 24, so I do actually have ID, but again, I didn't need to be IDd in that situation. (I know I look young, and it's if you look under 25, but at the same time it's not a situation that's ever happened to me before, and that's because it's not a problem for a parent to buy alcohol).