Once you've started contributing to the core code of WordPress, helping with tickets in trac. and carefully crafting patches, you'll soon start to wonder about the process by which code makes its way into the next WordPress release.
The quick answer is that code makes it into WordPress when one of the team of core developers adds it and no sooner. The developers are busy people, and often with different priorities and different views of WordPress to your own. This can make the process seem like a long and secret one.
Finally, don't be disheartened if your code is rejected. Even though WordPress has a strong community, the core developers have the final word in the direction of WordPress.