Size has got zero to do with how good the racing is, unless we have to endure more nonsense from the rose tints who like to tell us things were better 20 years ago. They certainly were not.
They may appear a bit on the large side in comparison pics (and I agree they are a bit stretched now), but I suspect most who were to see a refuelling era F1 car in the flesh would likely be surprised at how petite it is. Now they need bigger fuel tanks, therefore no chance being as short as a mid-noughties car.
The answers as of why the cars are so long are pretty much already anwered, I requoted them below.
Many factors do incite the teams to lengthen their cars. The hybrid PUs and all their ancillaries are indeed tricky to package and even if the fuel tank is only 110kg big, it's easier to lengthen the rear in order to help packaging (dont forget that the ES and the ERS CPUs must sit underneath the fuel area)... The mandatory weight distribution too incites them to lengthen the wheelbase. But aero is probably the main reason; they want to retain the very slim/undercut sidepods, the long floors for more ground effect, the more steady flow towards the rear of the car... One of the reasons the teams build gearbox casings that are way too long...
It's all for aero's sake, just look at all the empty space. They could fit all the components in half the length of that area if they had to.
I also recall something about a rule that certain parts ar not permitted to be further away than a given maximum, measured from the center line of the car. So putting certain parts away from the center line and make side pods wider and thus being able to reduce the length of the car is very difficult.
But the most difficult aspect with teh currend cars is the mandated weight distribution. Making the cars so long in order to get the engine mor forward, as well as the fuel tank with the batteries below them is one of the easiest manners to get this done. That it also enables tho shift the radiators mor to the front and thus stretch the side pods...
How extreme things have gone, take a look at de width of the actual side pods! the true pods are nowhere near as wide as the floor of the car anymore like in the past. The widest parts above the floor all are aerocrap parts: fins and bargeboards...
And if the pods could be narrowed even further, it would be done.....