Peak ignorance right here. It's a combination of factors. The origin point is indeed the utter failure to set up proper integration systems and regulate migration during the 2010s, which in turn meant that the people who came here were not educated in Swedish language, laws and values, leaving them outside the jobs market. It is also made worse by the fact that a significant portion of the people who came during that period have been brought up in cultures with highly incompatible views and values (for a concrete example, considering secular law a subordinate to religious shariah laws) , which makes integration that much more difficult. After some 7 years, only a third of adult Syrians have managed to get jobs - compare this to recent Ukranian refugees, where 2/3rds have jobs after two years.
For instance, whilst I worked in healthcare in Sweden, we on several occasions had patients refuse care from female coworkers on account of them being women. Something basically previously unheard of that's became a recurring issue. Every time it happened, it was a non-Swede, and oftentimes they had difficulties with speaking the language. Now I've had plenty of Swedish patients who were casually misogynistic against my coworkers, but never to the degree that they would demand to be treated by a man and outright refuse care.
rapes have not skyrocketed. this is a common right-wing talking point outside of sweden, and “ex-pats” love using this as an example of how the country has gone to shit. what actually happened was we changed the way crimes are reported, to make things that were formerly sexual harassment classify as rape of some degree. this is a good thing, as it highlights these behaviours as unacceptable rather than them just being tolerated.
I have included some pertinent statistics from the past twenty years [Source is BRÅ (Swedish ministry for crime prevention) - www.bra.se]
There has long trend of increasing sexual crimes of almost all types in Sweden (The only exception is sexual coercion), the change in definitions was limited, and is really only a minor confounding factor when compared to the overall picture. Besides, in 2019 they did their best to split out the expanded definitions (see rows 3 & 4) and the number of crimes covered are very small in comparison to the whole.
As for the demographics of those convicted, I find this far less relevant. Migrants are the victims in the majority of crimes committed by migrants (and the criminals and terrorists in question represent a minority of that group). As such, upholding the law is as much for the sake of the larger migrant community as for Swedish society as a whole.
However, if you're still interested in the connections between demographics and crime, you can read here:
Citation, straight from SÄPO (Swedish national security police)
https://www.sakerhetspolisen.se/ovriga-sidor/nyheter/nyheter/2024-05-30-iran-anvander-kriminella-i-sverige.html