That’s the joy in most Miyazaki movies. Any other movie would have an obvious evil villain. Miyazaki gives all of his characters motivation that is immediately relatable. Sometimes characters that appear to be villains at the beginning are heroes at the end.
All of these things mirror the real world. Rarely is someone actually intentionally evil. They may have different priorities, goals, fears, and motivations, and those may produce behaviors or beliefs that seem bad, but without understanding the why or what, it’s easy to just assume their “bad” people. Ashitaka doesn’t take the bait and is kind, respectful, and generous to everyone who isn’t obviously doing something atrocious (like the samurai slaughtering peasants).
Princess Mononoke is easily one of my favorite movies of all time and my favorite Miyazaki movie.