How is the naming of formyl chloride $\ce{CHOCl}$ justified? What is the functional group in it?
Why can't I name it as methanoyl chloride as acid halide is given more preference than aldehyde?
Welcome to parallel worlds of trivial and systematic names. We also use formic acid, acetic acid, acetyl chloride.
You can name them all systematically as methanoyl chloride, methanoic acid, ethanoic acid and ethanoyl chloride. But in the real lab life, nobody call them like that.
Formyl chloride has its name from formyl- as acyl derived from formic acid, the same as acetyl- from acetic acid.
Technically, formyl chloride is an aldehyde as well, as formyl is de facto an aldehyde group, being formally a member of the serie :
$$\ce{Cl-CH2OH <> Cl-CHO <> Cl-COOH}$$
But by naming conventions, both trivial and systematic, being a derivate of an acid replacing $\ce{OH}$ by $\ce{Cl}$ takes precedence to naming it as an aldehyde.
As a sidenote, it is rather funny aldehyde names are derived from the respective acids and not alcohols. Because the aldehyde etymology says aldehyde="alcohol dehydrogenatus", so it could be as well methylaldehyde and ethylaldehyde, instead of formaldehyde and acetaldehyde.