Songwriting usually doesn't include the bass lines or drums. Songs start with a riff, either keyboard or guitar generated, and you can write an entire song without any drums or bass.
When the song is done, then the drum and bass player comes in and "writes" and records parts to it. As any musician that is published will tell you, you typically don't get a writing credit for writing the rhythm backing of a song. I highly doubt anyone other than JM writes his bass parts. I'm sure he does. MP "writes" his drum parts, but MP doesn't get songwriting credits because of those drum parts. It's for the lyrics and arrangement work.
Take Anthrax. Charlie Benante writes most of the band's songs. He's the drummer, but he plays guitar and writes the songs on guitar. That's why he gets songwriting credit. His drum work isn't counted as songwriting.
Now, to the issue of JM getting "credited" as "Dream Theater" on songs, (i.e. lyrics by Portnoy, music by Dream Theater, etc.), typically, a lot of bands have royalty agreements between them, that no matter who does the writing, they all a percentage share of the songwriting royalties. Those agreements vary from band to band, so unless they (one of the band) tell you how it is split up, you never really can tell who is getting the "monetary credit" from song royalties.
Hope that didn't further confuse things. I don't know how DT splits up anything, but the bottom line is, while I am sure Portnoy and Myung write their own parts, drumming and bass playing usually don't amount to a true "songwriting" credit. That's usually reserved for the folks that write the riffs and arrangements that make up an actual song, not the rhythm parts.