Why does one need moral principles?

One needs a moral code as abstract principles applicable to an unlimited number of concrete situations so one can consistently carry out the proper actions over the entire course of one’s life.

Such principles allow a human being to project the consequences of their actions over the long term, as opposed to acting pragmatically by whatever “works” at the moment.

If one desires consistent results, one must act consistently. That is, on principle.