The code is in administrator\components\com_content\models\articles.php line 190.
Filter on the path column and it will show articles in all sub categories.
// Filter by a single or group of categories.
$categoryId = $this->getState('filter.category_id');
if (is_numeric($categoryId)) {
$query->where('c.path like (select concat(path,"%") from #__categories where id='.(int) $categoryId.')');
}
Replace line 190 in articles.php with the above line:
$query->where('c.path like (select concat(path,"%") from #__categories where id='.(int)
... and everything works great!
Now category show articles in all sub-categories!