In case you haven't noticed the politics behind it, let me explain. In hindsight, it plays something like this. Once Abolition of Art 370 ( not directly related to Indian Muslims but is now as part of a narrative ) , Abolition of TT, the RJB verdict in favor of a temple happened in rapid succession, the CAA was enacted. I'd say the government was expecting some trouble in earlier instances but not specifically at the passing of the CAA. Once they faced protests, my reading is they gamed it in two ways, one the protests would peter out or two - it'd lead to nation wide protests followed by riots.
In both circumstances, the GoI would've acted in the same way. Give protestors a long rope, wait till their patience was exhausted then let the more radical elements amongst them seize the initiative only to see riots following which what transpired in the Godhra Gujarat case . The usual action reaction formula
This would be the template were the protests against the RJB or the abolition of the TT too. The idea would be to portray the Muslims as the usual suspects. In the event, they didn't disappoint , the theatrics over Shaheen Bagh, the singing of the National Anthem , the reading of the Constitution, etc notwithstanding. It's a cynical game. But that's how it plays out here in India as it's ruled by the BJP.