Что это даёт
m.put("pear", 3);
m.put("apple", 5);
m.put("fig", 1);
System.out.println(m); // {apple=5, fig=1, pear=3} — always this order
Now printing the map is safe, iteration is predictable, and there are extras: firstKey() and lastKey().
The price: TreeMap keeps order by comparing keys, so it is slightly slower than HashMap and requires keys that can be compared — which is why Comparable from module 8 matters here.