The only time an aircraft can fly pass a restricted area without encountering any problem is when the controlling agency has given the permission either directly or via ATC to fly within the region.
But if a passenger aircraft passes through a restricted area without prior notice to the control agency, even before the aircraft enters the restricted area, concerned authorities will be alerted. ATC will communicate with those in control of the aircraft first, and if there is a response, ATC will order it to approach the nearest landing spot or order it to change it course towards the restricted area.
The reasons why aircrafts fly through restricted airspace without clearance is due to: lack of awareness of the activation of the airspace restriction, poor navigation performance, and poor air ground communication and lack of understanding of the procedure of obtaining clearance to enter the restricted airspace.