Most Leanpub books are written using one of our own writing modes, and those all have a table of contents.
However, some books are published on Leanpub using our Upload writing mode, where people use a non-Leanpub workflow to create their book. In that case, we have no control over the contents, and the author may or may not have decided to include a Table of Contents.
Here's an article that explains how our Upload writing mode works: