"The Duke and Duchess of Cambridge have accepted an invitation to visit Canada this fall, the governor general announced.. ..In July, Prime Minister Justin Trudeau sent an invitation to the duke and duchess to visit Canada with their kids." Huffington Post BC online, July 27, 2016
------------------------
See above. The Duke and Duchess didn't ask to visit. Rightly or wrongly the Canadian government invited them.  If you want to know why you'd have to ask the federal government . The federal government likely discussed the invitation with the provincial government before extending the invitation. 
BC and the Yukon have substantial tourism budgets. It seems highly likely that they received publicity and visibility throughout the world that they couldn't have bought for the money spent on the trip.  As a result of that publicity they probably have already reaped tourism revenues far in excess of the expenditures and will continue to do so in the future.