It didn't start off as something to spite Tommy, but when Carlo asked for Tommy's help he was denied, and basically told he was a fraud because of the Iceman book, and to a lesser extent his Casso book.

So Carlo added various lies into the book to make Tommy look bad , which he wrote in a rather quick fashion.