Birth By Sleep wasn't, since it's Kingdom Hearts Zero. 358/2 Days was because people wanted to play as the Organization members and people wanted to know what the fukk happened to Roxas during the time Sora stabbed himself with the Keyblade of People's Hearts at Hollow Bastion and became a Heartless up to the beginning of KH2. Coded was about some random ass phrase in Jiminy's Journal that he didn't write, so Mickey sent a Data Sora to check out what happened. And Dream Drop Distance is Chain of Memories status where KH3D leads directly into KH3. (Yes, I played them all. Didn't beat Coded. I watched the cutscenes.

Couldn't deal with it.)
Basically, since KH3 was nowhere near completion, people wanted more Keyblade adventures, and because Sora's connected to everybody they may as well kill the time by explaining what happened before we go take on Xehanort. The only one in my opinion that was necessary was Birth By Sleep and Dream Drop Distance cause that affects Sora and Riku directly. Coded just tells you that Sora knows he's gotta save people, and 358/2 Days tells you that Roxas went through some shyt then dipped out and got murked by Riku.