The Qur'an addresses its audiences in an eloquent early Arabic style. It is not obliged to arrange legal rulings, proofs and reminders in the separate chapters, technical definitions and continuous analytic sequences characteristic of later textbooks.
A ruling may appear with its wisdom or an afterlife warning; a historical event may incorporate an argument for divine oneness. Such transitions are not necessarily disorder. Their relevance to the audience and purpose of the passage can itself carry meaning.
Technical classifications are useful aids, but they must not override the Qur'an's own form of discourse. Interpretation should attend to how a passage actually communicates.