This only happens when an adjective comes before the number. Using an indefinite article (a / an) immediately before a number, or an adjective without an article is grammatically incorrect as shown below, although using the definite article (the) can work in either case:
endure a dreadful five minutes
*endure dreadful five minutes
*endure a five dreadful minutes
endure five dreadful minutes
The definite article (the) allows the adjective on either side of the number:
endure the dreadful five minutes
endure the five dreadful minutes
Using an indefinite article suggests that there are multiple instances of "five dreadful minutes". As shown above, the order of the adjective and the number has to reverse when an indefinite article (a / an) is added. Note that you can't replace the indefinite article with "one" or any other number:
*endure one dreadful five minutes
*endure two dreadful five minutes
This can be analysed as a form of ellipsis (leaving something out):
endure a dreadful (period of) five minutes
endure (a period of) five dreadful minutes
endure the dreadful (period of) five minutes
endure the (period of) five dreadful minutes
In all cases "period of" comes immediately before "five (dreadful) minutes". The indefinite article requires something to attach to, either "dreadful" or "period of". If neither are there, "a" must not be used either. This is not the case for "the", which can still be present without the adjective or the noun which ends up being left out, as long as there is something else it can attach to ("five (dreadful) minutes" or just "dreadful").