Rules are dead, but people are alive. As a doctor, treating anyone is still just treating, so there's no need to offend the East Palace because of it.
As an Imperial Physician, although he had not been in the palace for long, he had seen many eunuchs and palace maids fall ill, yet with so many idle Imperial Physicians around, no one treated their pitiful condition.
Starting out, he still had a passionate heart for helping others with his medical skills.
Seeing palace attendants who originally only had minor illnesses being dragged to their deaths, how could he not feel heartache and sorrow.
However, as someone born into a family of Imperial Physicians, he was educated from a young age that the most important thing in the palace was to abide by the rules. Protecting his own life would allow him to save more people.
He had to learn to act wisely and protect himself.