Signal could allow both options: register with a phone number or with completely anonymous logins. I think they just don't want anonymous users, visits from FBI etc. Also, it is not very profitable to sell ads to anonymous users.
You have to have a secure channel to exchange phone numbers too. The code could be communicated simply using a QR code. Other messengers already work this way and it works well.
EDIT: This proposal also suffers from a bootstrapping problem. You have to already have a secure channel to communicate the ids.