Why we can ask the question "Who baked the cake?" when we should use did link verb?
"Do"-support is only required when the the verb is negative ("I didn't bake") or there is subject-verb inversion ("Did you bake?").
Inversion often arises in a question because the question word usually comes first ("When did you bake?") but when the subject is "who", inversion is not needed, so "Who baked the cake?" is normal.
When "do"-support is not required, "do" may always be used, but normally only for emphasis or contrast. So for example:
I thought John had baked the cake, but he said he didn't. Well, who did bake the cake?
where the "did" is contrastive, implying "if it wasn't John, who was it?" It will probably be stressed, at least to some degree.