The requirements of weekly television ("Don't wreck the premise") sometimes force a character to act against his own best interests. A real William Riker would have taken his first chance for command and just promised to keep in touch with his beloved Enterprise shipmates. And gradually distance would fade those affections. But TV is different. If the cameras are on the Enterprise, then that's where fictional Riker wants to stay, at any cost.