Category slug in in loop always the same?

First, Please don’t use query_posts..

Second, you’ve set $category somewhere in code not posted and never change it. How do you expect it to be different? What you need to do is retrieve the categories, which isn’t that hard…

$cq = new WP_Query('category__in=4');
while ( $cq->have_posts() ) {
  $cq->the_post();
  $c = wp_get_object_terms($post->ID,'category');
  var_dump($c);
//   echo '<li class="mix '. $category->slug .'" data-filter="'. $category->slug .'">'. get_the_content() .'</li>';
}

… but categories don’t really have an “order” unless you’ve made an effort to give them one, so I don’t know how you are going to get the “last” category or even really what that means.

There is a similar issue with your statement that it “doesn’t matter if they are also in category Milk, chocolate or cheese”. There is nothing by default to mark the “primary” category so if there are multiple categories I am not really sure how to pick the one “correct” one.