I think the key factor is that "content" is preceded by "table". A table is an array of data which would force content to take the plural form. While you're correct that all the information in the book would be "content", a table of it makes it "contents".
It's similar to how a bunch of people is called a crowd. But if you're referring to different types of crowds you'd say "types of crowds".
Table of Content vs Table of Contents
I think the key factor is that "content" is preceded by "table". A table is an array of data which would force content to take the plural form. While you're correct that all the information in the book would be "content", a table of it makes it "contents".
It's similar to how a bunch of people is called a crowd. But if you're referring to different types of crowds you'd say "types of crowds".