A certain newly ordained bhikkhu was overwhelmed by the number of rules and regulations he was required to observe, and wanted to disrobe. When he told the Buddha about his intention, the Buddha asked him if he could observe just one rule. He replied that he could.
The Buddha advised him to Guard his mind well
Precepts are, in essence, just a way to protect us from excessive greed, hatred, and delusion — to keep us mindful. If we practise mindfulness diligently, observing each and every activity of the body and mind throughout the whole day without a break, we will be completely free from defilements (like an Arahant, though not yet an Arahant), and we won't do or say anything unsuitable or unwholesome.
All action and speech begins in the mind with the intention to do or say something. If the mind is left to its own devices without training in mindfulness, our observance of the precepts will be a sham — just for show, for self-aggrandisment — sooner or later we will fall away from our strict observance, full of guilt and remorse.
Precepts are important, but without guarding the mind they are of limited benefit, and may even lead to an increase of defilements. For details, read the first chapter of the Visuddhimagga.