It seems like your boss should have mentioned the benefits of your visibility. Otherwise, we can only guess.
Do you have any interactions with other people at work? Yes, it would be great if your code stood on its own merits, but that's not reality. Many people won't see your code. Even something as simple as making a request to HR, do you want to be "the programmer" or a person who is recognizable and should be treated like a human and not a number?
Talk about your projects. Show them you care and are passionate about what you do. No one can gain that insight just from your code. Why make it harder on yourself? Is it really too much to ask?
I don't see this as playing Politics, but if it is, it affects the people who don't play along more than those who do. If your company was bought out, do you think everyone is going to go out of their way and review all the code you checked in to see how good you are? They're going to look at your name and not know who you are. Code doesn't get fired; people do.