Our genes and those of all organisms except some viruses, is encoded in long polymers of DNA. Even so, in organisms from bacteria to us, there are special enzymes ceaselessly working inside our cells to fix breaks that can occur in these long DNA polymers. These enzymes are keeping us alive. But not only are the genes of the viruses flu and SARS-CoV-2 made of fragile RNA not the tougher DNA, but as they are viruses they don’t have the metabolism to constantly fix any breaks in their RNA polymers. So how do these viruses with their fragile RNA genomes survive?
Part of the reason must be that viral genomes are so small. We have billions of bases of DNA, bacteria have millions, but viruses like flu and SARS-CoV-2 have just tens of thousands. Even for a bacterium, one break per million bases of DNA is a problem, that would typically be enough to break an E. coli genome of millions of bases. But for a 10,000 base viral genome, one break per million bases would leave 99% of the viruses with intact genomes. Fundamentally, the smaller the genome, the higher rate of breakage you can tolerate.
RNA is more fragile than DNA because RNA readily hydrolyses = chemical bond between neighbouring bases breaking, releasing a water molecule – in a way that DNA does not. I think the word hydrolysis comes from the Greek words for water, hydro*, and dissolution, lysis. The Bionumbers database gives lifetime, before this hydrolysis breaks a bond, of about 1 year for RNA, as opposed to 100,000 years for DNA. These are however estimates, under a particular set of conditions, and the rates of chemical reactions tend to vary exponentially with many factors, such as temperature. So rates under the conditions viruses experience during transmission will be very different, but unfortunately I don’t think we know what they are.
I am not really a chemist (despite having a chemistry PhD) but apparently the reaction that breaks the bonds is (reaction goes left to right):

RNA molecules are held together by a backbone of alternating sugars and phosphates. The sugars are the pentagons with Os (oxygen) at one corner, and the phosphates are the Ps bonded to four Os. DNA is similar, but with a slightly different sugar. The genetic information is encoded in the bases, each of which can one of four types, in both RNA and DNA.
In the schematic above, the reactions starts with the bond between bases intact, in the leftmost panel. The reaction starts with an OH group (i.e., oxygen bound to hydrogen) losing its hydrogen (H). The bare oxygen then binds to the phosphorus atom (P) which then has five oxygens bound to it, in the state in square brackets which is I think an unstable transition state. One of these five oxygen atoms then detaches from the phosphorus (third column) and this detachment breaks the RNA polymer.
If, for example. this bond is in the middle of part the RNA molecule that codes for an essential protein, then that protein can no longer be made. It is debatable whether viruses are ever alive, but with a broken genome they are definitely dead, they cannot infect a cell and use it reproduce.
Viruses like flu and SARS-CoV-2 need to cross the air between one person and another before any of the tens of thousands of bonds in their RNA genomes hydrolyses. We know almost nothing about how viruses do this. As the droplets viruses are in dry out in the air, then maybe this increases the hyrodlysis rate, maybe it decreases it. We just don’t know. There are proteins stuck to the RNA inside viruses, maybe they protect the RNA against hydrolysis? We also don’t know whether when viruses ‘die’ this is mostly due to their genome breaking, their envelopes tearing, or …. So a lot of work to do, and ideally this should be done before the next pandemics.
* I think hydro may be ancient Greek for water, modern Greek may be different. So if you are on hols in Greece and thirsty, asking for hydro may not work.