For example, the murdering doctor example assumes that there are no dangerous second order consequences to randomly murdering people. That isn't a safe assumption. A doctor might reasonably conclude there is enough value in having trustworthy institutions that the locally optimum choice is different from the globally optimum choice after evaluating the risks.
A utilitarian could make either choice in any of those examples if they disagree with the assumptions implicit in the question - which isn't really allowed in this sort of thought experiment. The situation is artificial because the author is allowed to create certainty and constraints which don't map to the reality where these problems will be encountered. Any moral framework will give weird results if applied to artificial situations, so the construction of artificial situations where the author objects the utilitarian answer is unless as evidence.