Because they could, and to show that they could.
The Ka-50 uses coaxial rotors, which significantly improve the controllability of a helicopter. It's still not as easy as a fixed-wing, but it frees up some of the pilot's mental resource towards fighting.
The helicopter was also meant to fight entirely with smart weapons. To deploy them, it comes with a helmet-mounted cueing system, similar to that employed on the F-35, even if less high-tech.
The gun isn't fixed or turreted, but uses a computerized aiming system, potentially requiring the pilot to only look at the target and keep the helicopter pointing in its approximate direction.
The F-14 was all two-seat, the F-18 is single or tandem, but the F-35 doesn't have a two-seat version at all. Was that a mistake? Time will tell, but increased automation always prompts an attempt to reduce crew size.
The main drawback of the otherwise very practical coaxial configuration is the complexity and weight of the transmission and dual hubs. Being heavily armored, each crewmember entails a lot of weight. Single-crew configuration requires more pilot skill, but makes up for the extra hardware's weight.
At the time, the attack helicopter market was dominated by Mil with their long experience. Kamov wanted to push a product disruptive enough that it would negate the incumbent's advantage. They succeeded at impressing the observers with impossible-looking feats, and only needing one pilot added to the machine's "rotary-wing fighter" image.
But ultimately, the military never asked for a single-seat attack helicopter. They didn't have a long line of such aircraft, a training program for a combined pilot+WSO skillset, or a particular need for such. It was impressive, but they preferred to spend a bit more for larger engines and a more versatile two-seat configuration.
There are some articles that attempt to describe the development and its motivations, though the bits of information are scattered around quite sparsely.