Because nothing says that
toMap returns a HashMap specifically, so why would you expect it to abide by the same rule as HashMap specifically?