When scheduling intervals across multiple resources, why sort?
Why sorting? One reason is efficiency: the algorithm can easily be improved to run in time $O(nd + n \log n)$ instead of $O(n^2)$. The other reason is that it is not immediately clear (at least not to me) what label to assign to intervals when processing them out of order: you may get yourself stuck later on.

Here is why it's faster: By iterating over the intervals in order of increasing start time, we can limit the inner for-loop to d iterations. Since all intervals that precede I_j have already been considered in an iteration of the outer for-loop before the current iteration, we know these intervals are already 'scheduled': they have a label assigned to them. Since there are only d labels, there are only d intervals (namely the latest for each label) that can possibly overlap with I_j. The inner for-loop only needs to look at these d intervals for each iteration of the outer for-loop, resulting in a total running time of $O(nd)$ after sorting ($O(n \log n)$ time).

The line For each interval I_i that precedes I_j in sorted order and overlaps it does not clearly capture this. Instead the algorithm should keep track of the set of intervals containing for each label the most recently encountered interval labelled as such. The inner for-loop should iterate over this set, containing only $d$ intervals.
Your second algorithm in it's current form is not correct, in that it does not always find an optimal solution. Consider the three intervals $\{(1,2),(3,4),(1,4)\}$ which can be partitioned in two sets of pairwise disjoint intervals: $\{(1,2),(3,4)\}$ and $\{(1,4)\}$, i.e. the algorithm should find a label for all intervals when $d=2$. When your second algorithm takes these intervals in order $\langle(1,2),(3,4),(1,4)\rangle$ it may do the following:


For interval $(1,2)$ labels 1 and 2 are available (none of the preceding intervals overlap, because there are no preceding intervals). We choose label 1.
For interval $(3,4)$ labels 1 and 2 are available (none of the preceding intervals ($\{(1,2)\}$) overlap). We choose label 2.
For interval $(1,4)$ all preceding intervals overlap, no labels are available. The algorithm fails to label this interval.