Attack-oriented CTF competitions try to distill the essence of many aspects of professional computer security work into a single short exercise that is objectively measurable.
The focus areas that CTF competitions tend to measure are vulnerability discovery (auditing source, binaries, webapps), exploit creation (binary & webapp exploits), toolkit creation (creation & preparation), and operational tradecraft.
A modern computer security professional should be an expert in at least one of these areas and ideally in all of them. Success in CTF competitions demands that participants be an expert in at least one and ideally all these areas. Therefore, preparing for and competing in CTF represents a way to efficiently merge discrete disciplines in computer science into a focus on computer security.