The flood continued forty days on the earth.
"40" is the number of testing with judgment that follows as observed in many Biblical texts.
It rained here for 40 days and 40 nights
Moses will flee to the wilderness and be a shepherd for 40 years.
Moses will spend 40 days and 40 night on Mt. Sinai
Moses will spend 40 days and 40 nights pleading for Israel
The most lashes by Law one could receive was 40
The spies of Israel spent 40 days observing the promised land of Canaan
Israel would wander for 40 years for not believing Caleb and Joshua's report
Israel served Philistia 40 years before Samson set them free
Goliath taunted Israel for 40 days before David showed up and ended his boasts
Elijah ran 40 days away from Jezebel when she threatened to kill him
Nineveh had 40 days warning that they were about to be destroyed
Jesus spent 40 days in the desert being tempted
Jesus spent 40 days on earth after His resurrection before He ascended
The Bible never states specifically that 40 means something, but it does frequently show up as a character or plot device in many stories.