Partly a coincedence that those particular actors had personalities that gelled with each other.
Also partly b/c maybey at the time of TNG, they had no idea if the show would be successful or not. In 1987 Star Trek was all about Kirk and Spock and it was sacrilegious to do any different. Those actors had no idea that TNG would take off the way they did, and they were all likely very grateful for the work and minor stardom.
With DS9, VOY and ENT, it was proven that Trek could be done w/o and Kirk and Spock and more importantly w/o Shatner and Nimoy and the NCC-1701 starship Enterprise.
That may have played a part in later Trek actors pysche of hey "this is just my job and these are my co-workers", rather then a "unknown journey with some friendly people that turned into life long friends while we tap into an icon". Same with the TOS cast in 1966, at that time it was likely just another sci-fi TV show to them, plus the supporting players weren't given as much to do and they weren't given royalties. I think this may have to do with some of the reason the TNG cast got along so well.