Why did Sora become a shadow?

Why did Sora become a shadow? In order to save Kairi, Sora turns Riku’s Keyblade on himself. This releases Kairi’s heart from within Sora, reviving her, but this also completes the Keyhole and casts Sora into darkness, transforming him into a Heartless, and also producing his Nobody, Roxas, as well as Kairi’s Nobody, Naminé.

In order to save Kairi, Sora turns Riku’s Keyblade on himself. This releases Kairi’s heart from within Sora, reviving her, but this also completes the Keyhole and casts Sora into darkness, transforming him into a Heartless, and also producing his Nobody, Roxas, as well as Kairi’s Nobody, Naminé.