This is easyJet’s new A320s. A tried and tested design. Whilst 5 days is relatively quick, it is not unusual. The crew know it, the ground crew know it, and once it has completed its factory tests and is passed good for service, it can go into service straight away. Iberia’s 2nd A350 was 10 days from first test flight to being in service.
But, notably, airliners are subjected to a much more rigorous testing from maiden flight first to being in service. Almost all of the testing is with the craft itself, rather than its interaction with the infrastructure it relies on.
Perhaps a better railway example was the Class 66s - after the first few were tested, a good number of them were taken off the ship at Newport and on revenue trains within hours.
I wonder also if the testing of aircraft is much simpler, as there is plenty of 'network' capacity, whereas in general on the rail network, there is a limit to how much testing can be done at any time