Han had no idea just how important Luke, Ben and the droids were. Ben says "no questions asked, let's just say we'd like to avoid any Imperial entanglements." Han wasn't an angel and never pretended to be. He was a brash smuggler who was hired for one trip to Alderaan. When Alderaan was destroyed the mission became something else entirely. That's why he walked away near the end of the film. He had that mindset of 'this isn't my fight, I just got pulled into it'. But his attitude changed.