As already mentioned:Well I didn't have it set to 30 days.
Further more if what you're saying is true - and i'm still not sure it is. That is an extremely destructive setting. You toggle it off on one device, there's no warning it will delete anything in the cloud - it could instantly delete 15 years worth of message off all your other devices with no way to recover.
Yet you manually delete one spam message and its sat in recently deleted for 40 days for you to recover.
That makes zero sense to me. That's also not how it works on Apple Mail - you can keep only the latest X amount of days downloaded - but it doesn't delete anything from the server. If a switch does this it needs to carry a very heavy warning that requires multiple entries of a passcode to achieve.
Regardless of this - this setting has never been changed on any of my devices. So unless the new phone turned it on temporarily, deleted everything and set it back to forever after a restore - that's a pretty horrific bug i'm sure we'd be seeing lots of people with.
I do have time machine backups of download chats - there's multiple issues with that thought. You can restore them back on macOS but it won't put them back into iCloud for other devices. Also at some point around May it deleted the downloaded database on macOS so it went from being over 300mb to just 4mb and I need to merge all those databases with a manual script.
Apple said:Important: If you choose an option other than Forever, your conversations (including all attachments) are automatically removed after the specified time period elapses.
If you use Messages in iCloud, deleting a message or conversation on your iPhone deletes it from all your devices where Messages in iCloud is on. See Keep your messages up to date with iCloud in the iCloud User Guide.
Delete messages and attachments in Messages on iPhone
In Messages on iPhone, delete messages, attachments, and entire conversations.
support.apple.com