Based on what you posted, you may want to go back and work on them a few more years.
As someone who has been a Software Engineer approaching 30 years I will agree with you on a few points. Yes, developers are rather poor at documenting their code. Yes, it's not always clear what developers were thinking when they wrote their code or why they wrote it a certain way. However, in the vast majority of cases, business logic is not determined by the developers. It is determined by the Business Analysts and the user community. I can look at code and tell you what it's doing. Any decent developer can do that. What I can't determine is if it meets the users needs unless I have those specifications.
Based on your list of variables, something tell me you also subscribe to conspiracy theories, believe in the Loch Ness monster, and have seen a Sasquatch. Your "examples" are you pulling at straws that really hold no weight in the process. You're ignore the number 1 rule of software development. KISS - Keep it simple stupid. At the highest level Royal is attempting to maximize their their profits per sailing. At a deeper level their contractor is using algorithms and data structures that allow them to calculate the various profit margins of all possible scenarios. It's really not that complicated. The contractor would be given a list of the available rooms (Your COVID examples are moot since the quarantine cabins would not be included in this list), the software would build its data structures and run its algorithms to find the most profitable paths. Are there some "unknowns" in the process? Of course. Is it magic? Not in the slightest.