The elaborate backstory that Brooks created for his fictional alter-ego was supposed to lead to a movie called 'The Lamb' ... but that movie was never made.
If you think his Lil Nas X collaboration came out of nowhere, then, well ... you haven't been paying attention to Cyrus' long history of doing the unexpected.