Why doesn't the landing gear get raised on the first flight of a new airplane?
Test flying is thoroughly planned, and of the many things to test during development, the landing gear is just a minor part. In the first flight the goal is to check out basic functionality and how well the low-speed performance was predicted. The landing gear can wait for one of the later flights. You can see in the photo of the A350 that the slats are extended and the flaps are in take-off position. The pilots are busy testing handling in take-off configuration, and for that the gear must be down. You can be sure that they also tested the landing configuration at altitude before going down to land.

Generally, the tested envelope of the aircraft will be expanded step by step. Since every flight will contain a take-off segment, it is prudent to check out this part of the envelope first. Once the low-speed regime is tested, consecutive flights will take the aircraft to higher speeds, and only then will it be necessary to retract the gear.

Also, the first flight of a newly developed aircraft has become a ceremonial affair. After having spent hundreds of millions of dollars or euro, and with all the media attention, nobody wants to live through the embarrassement of a gear failure on occasion of the first flight.

This was not always the case. The F-100 went supersonic on its second flight; taking this kind of risk would be unimaginable today without the pressure of an arms race.