Allah(swt) knows because Allah(swt) exists beyond time as we know it, to Allah(swt) there is no past or future. You on the other hand do, thus you don't know whether you'll be amongst the people of Paradise or Hell.
so in short as to why we are here, you must first remember this ayah;
Allah(swt) says;
Surah Ahzab 33:72: "We did indeed offer the Trust to the Heavens and the Earth and the Mountains; but they refused to undertake it, being afraid thereof: but man undertook it;- He was indeed unjust and foolish."
when Allah(swt) creates something, He(swt) offers the Trust of having Free Will, and thus being tested, All refused, except Humans and Jinns. so we are here to fulfill that Trust, to undergo the test of whether we'll keep our covenant with Allah(swt), to worship Him(swt) alone without any associates, or not. This the reason for us being here, It is for you to experience with your own self, to be your own witness. Hence why in the day of Judgement even your limps will speak while you wont be able to, to either witness against you or witness for you.
May Allah(swt) guide us and keep us on the straight path. Ameen ya Rabb!
Allah(swt) knows best.