Two rides per week are better than one
One big reason to do two shorter rides instead of one long ride is training frequency. If you’re a cyclist who only has about 5 hours per week to ride a bike, then you’re be much better off doing two rides per week and have 2-3 rest days in between. If you do one long ride, then your body will be without any training for 6 days in a row, which is not very effective and you might stagnate.
Shorter rides are always easier to recover from. You can replenish lost fluids faster and you burn less calories overall so it’s easier to replenish glycogen too. This also means you can be relatively fresh the next day and have a quality training session again. Plus, you can still be active for the rest of the day. A very long 5+ hour ride will probably effectively kill your day. This matters if you’re not a professional cyclist but just a regular person who also needs to work, socialize, and do chores.
Training at intensity is better for racing
If you go for two shorter rides, you can spend the combined 5 hours at a higher intensity than if you did all 5 hours in one ride. So, the real question is whether it’s better to have two sessions at a little higher intensity or one continuous session at a lower intensity.
The thing is, you probably don’t need more endurance training. Doing very long low-intensity rides improves your endurance and efficiency when riding very far. But most cycling enthusiasts already have plenty of endurance to finish the race they are training for. Maybe with the exception of certain ultra events. What cyclists usually need is a higher power at lactate threshold. That will allow them to maintain a faster speed during that race. Higher intensity during training helps with that.
Spending more time at ineffective intensities just adds fatigue you have to recover from. You can improve your lactate threshold and VO2 max with rides that are even shorter than 2.5 hours. So, two shorter rides will give you better training frequency and adaptations if your goal is to improve for your next race.