Specifically, why would a medieval knight wear a cape? Are there combat applications?
Real capes have much more coverage than the popular depiction of "towel hanging on the rack" cape. I don't have access to my laptop right now so I can't find you a contemporary picture but the kind of very full cape worn by Jon Snow that can be held close in the front is more accurate than the thin narrow strip of cloth worn by Superman (although the front part might be thrown behind the shoulders in vigorous movement).
A cape functions exactly like a coat. Oftentimes the under layer of clothing makes wearing a coat with sleeves impractical so a cape is preferred. For example a suit of armor would be too cumbersome with a thick coat over it.