Suffering and good people

When a godly person met with an automobile accident, he was perturbed and perplexed. Why did this happen? In his analysis, he did not commit any sin, blunder, or deviate from the Will of God. If so, was it permitted by God? Can bad things happen to good or righteous people? Yes, in this imperfect world, suffering could happen to righteous people, as well as, those who run away from obeying God and those who commit willful sin. Such suffering has purpose and meaning.
Punishment and judgment: Achan’s sin brought defeat to the Nation of Israel. (Joshua 7:21) One man’s sin brought disaster upon the Nation of Israel. It was God’s punishment for robbing that which was devoted to destruction. (Joshua 6:17-19) All should be burnt by fire in the city of Jericho, but he stole that belongs to God.
Warning and course correction: God commanded Jonah to go to the city of Nineveh, but he did not wish to go there. Hence, he took a ship to Tarshish and slept on the lowest deck of the ship. God sent great wind and mighty tempest. When all were praying to their own gods, Jonah was found sleeping. He was woken up and he confessed that he ran away from the presence of God. Upon his request, he was thrown into the sea. God used a special fish to take him to Nineveh after he repented and prayed from its stomach.
Testing and maturing: Job was certified as righteous by God. However, Satan accused God that he was bribing Job to be his follower. God permitted Satan to test Job. (Job 1:5-8) The calamity and disaster that fell upon Job revealed Satan as a murderer, killer, destroyer, and robber. (John 10: 10) Though his target was Job, many were affected. Job’s herdsmen, shepherds, farm workers, and household workers all lost their lives, many became widows, destitute, and lost their livelihood. Job is confident that the suffering is like gold being tested like fire and will come out like gold. (Job 23:10)
Do we consider suffering from God’s perspective?