Al-Qurtubi (rahmatullahi alayh) states:
“If it is said: How is it that we see an abundance of evil and sins occurring in Ramadhan; if the devils were chained up this would not occur?
The response: They are only chained away from those who fast (correctly) fulfilling the conditions of the fast and being mindful of its etiquette.
Or it is said that those who are chained are some of the devils; i.e. the rebellious ones, and not all of them, as has been previously mentioned within some of the other narrations.
Or, it is said that what is intended is that evil is minimized in (Ramadhan); and this is something well-known. For the occurrence of that (evil/sins) is less within than it is in other months.
Hence, them all being chained up does not necessitate that evil or sins will not occur. For there are other reasons besides the devils which cause this; such as despicable souls and evil ways, as well as human devils.”
[By Ibn Hajr (rahmimahullah) in Fathul-Baari]