If your phone used some data in the background it will of course charge you (EG your phone constantly checks for email, Facebook, WhatsApp, weather etc).
If you know your phone was off and couldn't have done it then you can query it with an agent and they will confirm you were charged correctly, or if its just a couple of pence sometimes just refund it out of kindness. You will have to wait 24 hours for them to do this and of course not use your phone during this time or you will be charged again!
Most users leave a small amount of credit on their accounts for reasons such as this, plus for all the things not covered by a goodybag. Make sure you follow giffgaff advice and queue future Goodybags early so you don't experience loss of service the day your bag ends.
In future if you have to use a voucher make sure your phone data is off.
There is never any reason for you to topup and then buy a goodybag. Why not just buy the goodybag first time? You can even do 8t by phone on 43430.