<<...is it mandatory to seal the firewall?>>
I think so. My QB -8, for example, has several dozen "holes" around the perimeter, really the ends of the notches between each bent firewall flange. It needs a bead of something around the perimeter, because....
(1) Small holes allow significant noise transmission.
(2) Our typical exhaust pipe is slip-jointed and may leak to some degree. If cabin pressure is lower than cowl pressure, the unsealed holes become a carbon monoxide path.