DCT vs DFT why do we need/want phase?
A DCT is identical to a DFT, twice as long, of the input data concatenated with its mirror image.   Data concatenated with its mirror results in symmetric data.

Since a symmetric vector is strictly even, there are no odd (sine or imaginary) components in the DFT result. Just cosine (or real or even) components.  Thus you can reconstruct the original input without the all-zero imaginary component.  (In practice, there might be some numerical rounding noise).

Not so with a DFT of just the original data (not doubled and mirrored), which likely is not exactly symmetric (even).  Thus you need the full complex result of a DFT to reconstruct its input (unless it just happens to be perfectly circularly symmetric around the 1st vector element, x(0)).