ようこそ is used as a general “welcome,” like “Welcome to [insert location name],” while いらっしゃいませ is used when an employee is welcoming you to their store/shop.
No, it’s an excellent question. I’d like to know more about this myself.
The one thing I can tell you from experience without doing any further research is that ようこそ is used to greet travelers, while いらしゃいませ is used to greet customers.