The sceptics assert [Sext. Emp. adversus Math. lib. viii.], though absurdly, that the origin of all religious worship was derived from the utility of inanimate objects, as the sun and moon, to the support and well-being of mankind. This is also the common reason assigned by historians, for the deification of eminent heroes and legislators [Diod. Sic. passim.].
Source: wiktionary