The main reason is that the first example is not correct.
It would be 'worst of all', not 'worse of all'
('worse' is comparative, 'worst' is superlative).
'The' should be included in both these cases, for superlative usage.
'Your woodwork was the worst of all', 'The 4th of July was the hottest day'
However, you are correct: for comparative we don't use 'the' while for superlative we do.
- 'Your woodwork was worse than all the others'
- 'The 4th of July was hotter than the previous week'
It is similar to the difference between 'the' and 'a'. 'The' is 'definite', 'a' is 'indefinite'.
Using a superlative is all about singling out a particular item for attention, which requires being definite about it. Comparing things is less definite
('These ones are hotter than those ones, but some other ones are even hotter')
By the way, there is of course a different and more specialised construction where you do use 'the' with a comparative e.g. 'the hotter, the better' to mean 'the more that something is hot, the better it is also'
However, outside of that special case, you would normally only use 'the' with a comparative if your 'the' was actually referring to the noun, rather than the adjective ('The hotter water is used to warm the pot' -> 'the' is already needed in the simpler sentence 'The water is used to warm the pot', so it doesn't have anything to with 'hotter').