Therefore the Wordpress codex states to question posts from different groups i personally use this:

query_posts('cat=2,6,17,38')

I'm doing that within this (http://pastebin.com/69WTBi8Q) script to show feed from various groups, but it is only showing the very first category within the string. http://dev.liquor.com/custom-rss-feed/

why?

Well, you will find a few things you must do in a different way. That code is not outputting RSS, since you are delivering the headers far too late. It's rendering as text/html, not application/xml. You are able to query posts telling it to create a feed:

query_posts(array(
  'cat' => '2,6,17,38',
  'feed' => 'rss2'
));

To repair the course problem, try carrying this out:

query_posts(array(
  'category__in' => array(2,6,17,38),
  'feed' => 'rss2'
));

You have to hook this onto a hook whenever after 'init' but no after 'wp_loaded'.