In this case, it kind of seems like a win-win: the doctor didn't have to violate their conscience, the baby got cared for, and the parents got to interact with a doctor who would be much friendlier and helpful than before. People saying "what if there were no doctor available" are missing the point. There was one, and we have no idea what would have happened in that hypothetical.
Honestly if we only looked at this case, yes it wasn't a big problem. But what about the next time someone do something like this and there aren't access to another doctor?