Hello and welcome!
Only slightly confused??? I would be very confused.
Your nurse was following protocol to give you a second test, but as you changed your diet between the tests, this may have been why your HbA1c was reduced from 54 to 45. The HbA1c is a sort of average of the previous 2 to 3 months, but is quite heavily weighted towards the previous 3 to 4 weeks, so yes, your diet could have made that difference.
Have you been given a follow up appointment with the nurse? If not, I suggest you make one yourself and discuss it all with her. Make sure you tell her about your altered diet. Meanwhile, carry on as you are doing as this is clearly working.