There’s a mistake in your query that completely skews the result in favor of spaces: you check if a file uses tabs by seeing if it has more lines that start with a single space than those that start with a single tab.
However, pretty much any version of [lang]Doc (e.g. JavaDoc, JSDoc) use a leading space in front of the * in block comments, e.g.:
* <-- leading space
*/ <-- another leading space
This means that tab-indented files with relatively few code but a lot of (top-level) documentation will be considered to be space indented.