why does 2 mole NaOH react with 1 mole HCl in titration?

Only in our dreams. It doesn't. HCl to NaOH is a 1:1.