I think they are more unlucky than not. They were few minutes away from a draw against Italy and were denied a clear pen in the last minute. Otherwise they would be on 2 points needing just a draw which also favours the Belgians in their final game to go through while Italy would still need to not lose their last match to get through.
Tiny margins.
Even as a Swede I have zero problems with Sweden being knocked out. They have been painful to watch for years, which is why I have mostly not bothered, and they were only in this tournament to begin with because of this stupid format.