Upvote:2
Neither Sweden nor the UAE will have any problems with that itinerary.
(Of course, it may be a challenge to convince the Swedish consulate that you're going to leave after your visit, if your ties to Tunisia are weak enough that you're willing to go to the UAE for work, and you're not established in the UAE with any strong ties yet. But that's independent of whether your physical travel goes directly from Sweden to UAE or via Tunisia, so don't let that determine your routing).