One reason is that they allow you to write general, primitive functions, and then compose them together or hoist them up into the same category.<p>Consider this example, written in Java 8.<p><pre><code>    &#x2F;&#x2F; Maybe&lt;T&gt; can be Nothing(), representing failure, or Just(X) representing success.

    public abstract class Maybe&lt;T&gt; {}

    public class Just&lt;T&gt; extends Maybe&lt;T&gt; {
        public final T value;
        public Just(T value) { this.value = value; }
    }

    public class Nothing&lt;T&gt; extends Maybe&lt;T&gt; {}

</code></pre>
Now consider these function signatures:<p><pre><code>    &#x2F;&#x2F; Returns Nothing() if argument is negative
    public Maybe&lt;Double&gt; squareRoot(double x);

    &#x2F;&#x2F; Returns Nothing() if divisor is 0
    public Maybe&lt;Double&gt; divide(double x, double y);

    </code></pre>
What do I do if I want to chain these functions together to write a &quot;square root and divide&quot; function?<p><pre><code>    &#x2F;&#x2F; Returns Nothing() if dividend is negative or divisor is 0
    public Maybe&lt;Double&gt; squareRootAndDivide(double x, double y) {
        Maybe&lt;Double&gt; sqrt = squareRoot(x);
        if(sqrt instanceof Just&lt;Double&gt;) {
            return divide(sqrt.value, y);
        } else {
            return new Nothing();
        }
    }
</code></pre>
This is kind of ugly. And if I want to compose lots of Maybe values, all of this instanceof nonsense (or having a tagged union in C or whatever) becomes extremely tedious.<p>Better is to define a function to contain this logic:<p><pre><code>    &#x2F;&#x2F; Returns Nothing() if x is Nothing(), otherwise returns f(unwrapped x)
    public &lt;A, B&gt; Maybe&lt;B&gt; bind(Maybe&lt;A&gt; x, Function&lt;A, Maybe&lt;B&gt;&gt; f) {
        if(x instanceof Just&lt;A&gt;) {
            return f.apply(x.value);
        } else {
            return new Nothing();
        }
    }
</code></pre>
Now I can write the above squareRootAndDivide code like:<p><pre><code>    public Maybe&lt;Double&gt; squareRootAndDivide(double x, double y) {
        return bind(squareRoot(x), ::divide);
    }
</code></pre>
Now I can chain any number of calls that may all end in failure, not having to worry where the failure takes place:<p><pre><code>    return bind(bind(foo(x), ::bar), ::baz);
</code></pre>
That looks kind of stupid. We could define `bind` to be a member of the abstract class Maybe, and refer to `this` instead of `x`, then we could rewrite that like:<p><pre><code>    return x.bind(::foo).bind(::bar).bind(::baz);
</code></pre>
Which in Haskell would look like<p><pre><code>    foo x &gt;&gt;= bar &gt;&gt;= baz   
</code></pre>
Quite clean in both languages!<p>Of course, Java might be a bad example, because you might say &quot;Well, I would just throw an exception for any of those illegal arguments, and that would also short-circuit the computation&quot;. This is true.<p>In Haskell, there is the Either type, which is similar to the Maybe type except instead of Nothing and Just you have Left and Right. The difference in Left and Nothing is Left can contain some information (such as a string explaining what failure happened, like a Java exception). Like Maybe, Either is also a monad, and can be chained together in much the same way, except instead of short circuiting on Nothing, it short circuits on Left.<p>So in Java, it&#x27;s almost as if you are always living in the Either monad without even knowing it! Of course, this is a gross abuse of terminology.<p>There is also <i>far</i> more that can be done with monads than representing failure (although they are great for that in the above examples, or in parsers, etc). This is just a simple example.<p>It also might be interested to note that you cannot construct a Monad interface in Java that has this `bind` function, because Java lacks Higher-Kinded Types. Consider a type in java Foo&lt;A, B, C&gt;. It doesn&#x27;t make sense to talk about Foo&lt;A, B&gt;, because Foo takes 3 type parameters. In Haskell we can talk about Foo&lt;A, B&gt; as a &quot;higher kinded&quot; type that takes another type as an argument (C) to produce a concrete type of Foo&lt;A, B, C&gt;.<p>As such, we have to code an ad-hoc monadic interface for every type we want to have one, but this means we can&#x27;t write functions that operate on any generic monadic type.<p>Rust is currently running into this -- they have monad-like interfaces for Result and Option (Rust versions of Either and Maybe) where the function and_then is their bind. I would like to write a function which can say, go from Vec&lt;Option&lt;u32&gt;&gt; to Option&lt;Vec&lt;u32&gt;. Where it returns None if any of the elements of the Vec were None.<p>I would also like to write a function that goes from Vec&lt;Result&lt;Err, u32&gt;&gt; to Result&lt;Err, Vec&lt;u32&gt;&gt;, giving me Err if any of the elements of the Vec were Err. You can see how this is the same pattern as above. In Haskell, with Higher-Kinded types, we can write this function generlized to <i>all</i> monads (called `sequence` in the standard library), but in Rust or Java, I would have to write this function for each particular instance.<p>You might find it valuable to read something like [1], but it might use too much Haskell syntax to be particularly readable. Give it a shot, anyway. Specifically for Monads, the section about the Kleisli category is the most applicable.<p>[1] <a href="http:&#x2F;&#x2F;www.haskellforall.com&#x2F;2012&#x2F;08&#x2F;the-category-design-pattern.html" rel="nofollow">http:&#x2F;&#x2F;www.haskellforall.com&#x2F;2012&#x2F;08&#x2F;the-category-design-pat...</a>