Motivation for using Scala
The primary motivation for using Scala for examples in this book is as follows. First of all, Scala is a functional language. This means that it has support for almost all of the functional programming styles that have been developed so far. Another reason for choosing Scala is that it is designed explicitly with object-oriented programmers in mind. Scala positions itself as a mix between object-oriented and functional languages. This means that new programmers that come from the object-oriented world can use Scala as an object-oriented language. This facilitates the transition from the object-oriented style. In fact, Scala is often used as Java without semicolons, meaning that you can program your Scala programs similarly to how you used to program your Java programs. The preceding reasons facilitate transition for new programmers greatly. Also, Scala features a very powerful mechanics for functional programming. So, you can write functional programs just the way you would do in Haskell.
We can even say that Scala is more potent than Haskell because, in some circumstances, the object-oriented approach is absolutely necessary. You can access the entire JVM infrastructure, meaning that you can use any Java library from Scala easily. The infrastructure is very mature and industry-oriented. Unfortunately, you cannot say the same thing about Haskell, which is less production-ready than JVM languages. Purely functional languages such as Haskell are used in production. However, they do not possess as mature infrastructure, say, for dependency management or compile tools as does Scala. Even though you can use all of the object-oriented libraries from Java in Scala, there is an entire host of native libraries for Scala, which are also production-ready and can facilitate a purely functional programming style.
A final thing about Scala worth mentioning is that it is an experimental language. This means it is often used as a playground to test new features and research in computer science. This means that leading-edge research is available to you as a Scala programmer. Combine that with accessibility to JVM, and you get an ideal tool to advance your knowledge in computer science while developing real-world software.
In short, all of this means that while using Scala, you can use a wide spectrum of styles, from a conventional object-oriented approach all the way to leading edge functional programming research. This makes it a great language for examples in this books.