Ecclesiastes [Kohelet] 12:13 (WLC)
סוף דבר הכל נשמע את־האלהים ירא ואת־מצותיו שמור כי־זה כל־האדם׃
(My translation) The end of all things was heard: Fear God, and keep his commandments—for this is the sole end of man.
The issue is how to understand "all of man" in light of "the end of all things." I argue it's quite straightforwardly to be understood in light of the obvious logical progression: 'I heard the purpose of all things in relation to God: to fear Him, and to obey Him in His requirements as His creature—for this is the end of a man, and indeed his sole purpose, his כל.'
One should not ignore that "because all men this" (כי זה כל האדם) is assumed to logically follow (כי) "the end [read: purpose] of all things is to [worship God]." This more or less necessitates the intepretation: For this is the sole end of man [i.e. as 'the end of all things is to worship God' implies].