The Rama begins his comments on Shulchan Aruch with the Pasuk, שויתי ה’ לנגדי תמיד, Dovid Hamelech says I placed the name of Hashem in front of me all the time – constantly – the one who lives with a constant awareness of Hashem’s presence, will surely behave differently. This is a Halacha not just mussar, and rather an introduction to Halacha, because the more one lives this way, the more living in accordance to the Shulchan Aruch becomes an instinct by him.