What is the effect of NaNO2/HCl at 0-5° C on Nitro group?

In this particular reaction firstly $\ce{NaNO2/HCl}$ at $\pu{0-5°C}$ was taken and after that $\ce{H2/Ni}$ .


But what I doubt is, was there any role of $\ce{NaNO2/HCl}$ at $\pu{0-5°C}$ ?
Since only reduction occurred which can also be done by $\ce{H2/Ni}$[![enter image description here](https://i.stack.imgur.com/iMHaX.jpg)](https://i.stack.imgur.com/iMHaX.jpg)


