Why in the world would you use KaTeX to write a number that is just being used as a number, not part of a mathematical formula? But, if you must, at least use some tricks to make the spacing work correctly: since TeX treats `,` as `mathpunct`, you need to use something like `\$1{,}000{,}000` (or change its catcode) to get something that renders as a plain old non-KaTeXed "$1,000,000" would.