For me too.
Actually if I look at her itinerary I wonder why some people wonder what she was doing there.
Mary visited institutions and firms that are related to Denmark and the Czech Republic.
Isn't strenghtening bonds between countries one of the main tasks of the royals?
I also think that she actually must have been invited.
Otherwise the President's wife and the mayor would not have made so much fuss about her (and presenting her the key of the town) IMO.
The "Prague Autumn Festival" needs illustrous foreign guests as much as Mary may need to learn about European countries/cities.
Moreover I read somewhere that the Czech President and his wife will come to Denmark in the near future.
Not sure if this is true, though.