an upgrade generally takes 24-48 hours to happen
you used data on the day you upgraded, so you were still on your old contract, and therefore got charged for using it
happens for all contracts, no matter what service provider you are with. you should have been told about it
however, if you demand you were not told, and that it is unreasonable with the iphone as it is very data-centric, then you should be able to get a refund