It's not okay to do things you know are illegal.
Han was shipping cargo from a city where it's cheap to another where it's expensive.
Han wants to make money.
Han keeps shipping the legal cargo that earns the biggest profits.
Han realizes that he can make way more money by shipping illegal cargo.
Han makes a lotta money off of his shipments between cities.
Han gets caught by the police who were randomly checking cargo trucks.