The United Nations Convention on the Law of the Sea (UNCLOS),and the Safety of Life At Sea (SOLAS) both have similar text. The UK has incorporated both into its maritime laws, as I understand it. The claim in point, is that you could be overwhelmed by the number of persons and as such be at "serious danger to the ship, crew or passengers", hence you can offer assistance and reporting of a Mayday Relay, but you don't actually have to try and rescue. If being overwhelmed was a reasonable risk, I would deploy life raft and dinghy and not allow boarding. Then again, if the majority were comatose, but some weren't, I would make a call on picking up conscious persons in distress. To be frank, who knows what they would do until faced with a situation.
The moral debate is a fair one to have because morality is just a human construct to manage society. When society changes, moral boundaries can change and that is as plain as the nose on the end of your face e.g. rape and murder allegations made against British soldiers, domestic abuse, poverty levels. Where does moral obligation start, at the ballot box, at sea, how you spend your money? Morally you may be better protecting your crew from danger.
A key point that is made, even if rescuing small numbers that you can mange, which I am sure many would feel morally obliged to do, you may be prosecuted based on the draft law. Our Home Secretary has decided that ambiguity and threat of conviction to ordinary citizens is a price worth paying to catch a tiny number of criminals.
Final point, regarding where this government comes from, and why they are dangerous people as far as our liberties are concerned, the RNLI were roundly criticised by many and suffered abuse because they rescued migrants. There are people in this country, and in parliament (todays debate with the Home Secretary, for example) who believe "getting hard" with migrants is the solution. Morals are a charade for some.
The United Nations Convention on the Law of the Sea (UNCLOS),and the Safety of Life At Sea (SOLAS)
“ Every State shall require the master of a ship flying its flag, in so far as he can do so without serious danger to the ship, the crew or the passengers:
a)to render assistance to any person found at sea in danger of being lost;
b)to proceed with all possible speed to the rescue of persons in distress, if informed of their need of assistance, in so far as such action may reasonably be expected of him.”
Vile Abuse of RNLI https://www.bbc.co.uk/news/uk-england-kent-57999224