We do need to put "the".
What is good and what is bad maybe mentioned before this sentence.
Waking up early is good for fitness
Going to bed late is bad for health.
If this is the case,the good = waking up early,the bad = going to bed late
We don't say like this.
She accepted both waking up early and going to bed late with a calm state of mind.
Good and bad are adjectives but in such cases,we put "the" to make them nouns.
the + <adjective> = something <adjective>
This might indicates the usage of "the" as prefix of adjectives.