The Artscroll quotes the Iyun Yaakov's understanding of this Gemara and I think it directly addresses your question.
Shabbos 30b Note 22
Iyun Yaakov sets forth an interesting interpretation of the Gemara’s discussion here. He asserts that when the Sages originally sought to conceal the Book of Ecclesiastes, they were not troubled by the mere existence of inconsistent passages within the book per se. Indeed, the Sages were confident that these apparent inconsistencies, like others throughout Scripture, could be reconciled by achieving a deeper understanding of the text. As such, the textual problems did not undermine the legitimacy of Ecclesiastes as a whole. Rather, it was the particular nature of the contradictory passages that troubled them. The conflicting passages concerned some of the most fundamental issues of faith, and if one made mistakes in resolving them, he could be led to reject basic tenets of Judaism. [For example, when confronted with the passages giving different evaluations of joy, one could theoretically have concluded that Solomon extolled the joy that comes from materialistic pursuit, and denigrated the joy that comes from performing God’s commands.]
Thus, because of these potential pitfalls of interpretation, the Sages originally sought to conceal Ecclesiastes. In the end, though, they decided not to conceal it because the book contained “words of Torah”; that is, both the opening and conclusion of the book explicitly and unambiguously extol the spiritual life, and assert that this the only true satisfaction man can find in life.
The Sages thus felt that these clear statements, placed as they are at the beginning and end of the book, removed the chance that an intellectually honest person would misinterpret the crucial passages in the body of the book. As such, the Sages decided not to conceal Ecclesiastes (see Iyun Yaakov). Cf. Maharsha.