Agreed. It doesn't matter at all if asking is banned. Just learn how to talk around the question (not difficult), and always refuse to reveal previous salary.
It appears to matter in practice. Perhaps some people are struggling to talk around the question.
> A study published in June 2020 from researchers at Boston University’s School of Law found that, following the implementation of salary history bans, workers who changed jobs saw their pay increase by 5 percent more than comparable workers who changed jobs in the absence of a ban, with even larger benefits for women and African Americans.