This is why Torah begins with both ideas: the creation account describes the cosmological aspect and the gan eden account relates to the ethical.
This dual aspect is later reflected in Pirkei Avot & in the braisa of R Pinchas ben Yair, in Rambam, and then in Ramchal (Mesilas Yesharim etc), etc.