Why do this?

Why would one want to make an object that acted like a function? The biggest reason is that one can give arguments to a constructor when an object is built, and that this hidden state can then be used when the object is invoked in the fashion of a function.

For example, here is a general-purpose bigger than object, used for finding a value bigger than some element. The limit is given as part of the constructor when the object is build. After that, it can be used like a function, to find a value that is larger than the constructor argument. The fact that it is an object means that we can carry the value from the constructor to the point it is used.

In functional languages, such a value is sometimes known as a curry.

[audio] [real] Text to accompany slide10, in Chapter 16 of An Introduction to Object-Oriented Programming