“Get up.” Joshua had been very frank and honest with God in his prayer; now God is frank and honest with Joshua in His response.
“Why have you fallen on your face?” In the next verses God tells Joshua the reason for Israel’s defeat. Nevertheless, He asked Joshua the question because He had a reasonable expectation that Joshua was spiritually aware and mature enough to realize that since God had promised Israel success if they obeyed Him, if Israel was defeated then there must have been some failure on the part of Israel. At that point it was Joshua’s job as the leader of Israel to do the hard work of finding out where the failure was. As it turned out, God gave Joshua an idea of the problem, but Joshua still had to ferret out the whole truth and deal with it.
Too often people blame God for a bad situation when the problem is entirely a human failure.