Let me help illustrate the idea.

We consider, what targets will be yielded, every time a candidate is appended to all the existing combinations.

Here is my more understandable code using the same idea.

vector<vector<int>> Solution::combinationSum_dp_increment(vector<int> &candidates, int target) {
sort(candidates.begin(), candidates.end());
vector<vector<vector<int>>> dp(target + 1, vector<vector<int>>());
dp[0].push_back(vector<int>());
for (const int &candidate : candidates) {
// all the existing combinations, except for those whose sum exceeds target
for (int sub_target = 0; sub_target + candidate <= target; ++sub_target){
vector<vector<int>> new_combinations = dp[sub_target];
for (vector<int> &new_combination: new_combinations) { // append a candidate
new_combination.push_back(candidate);
}
int target_yielded = sub_target + candidate; // the target yielded
dp[target_yielded].insert(dp[target_yielded].end(), new_combinations.begin(), new_combinations.end());
}
}
return dp[target];
}