Why are there songs in OSTs and music albums that don't appear in the anime? There are songs from OSTs, or even full albums by bands or singers in the anime, that I have never heard in the anime. Some music albums for which this is true:


Neon Genesis Evangelion: S² Works — many unused songs and alternate mixes or arrangements of existing songs.
Le Portrait de Petit Cossette Original Soundtrack — the song my love, so sweet is never used in the OVA.
Keep the Beats! by GirlDeMo.
God only knows -Secrets of the Goddess- — the full version that is 11 minutes longer than the one used in the OP of The World God Only Knows: Goddesses!


Why do they do this? For fan service? To make us feel like the bands or singers are real artists? Or to get more profits from CD sales? In which case, couldn't they have just picked the cheaper alternative of selecting some existing songs that are good fits for the anime?
The Opening and Ending tracks are normally shorter for anime, as the songs were usually originals developed before the anime and the artist was paid for a portion of it to be used in the anime, not to mention that the songs also need to fit in broadcast time. On the other hand, there are also Opening and Ending tracks which were purposely made for the anime (or the other way around like the case of Black Rock Shooter).


  Some songs are even from full albums by the bands or singers in the anime, but they also didn’t appear in the anime either.


These are probably the singles where Opening and Ending tracks come from, like with a lot of ALI PROJECT's album, as I said above, sometimes an artist is paid for just a portion. Of course, there's nothing stopping an artist building an album around that song as well.

Certain BGMs are sometimes actually a number of BGMs from an anime which were split, which is why sometimes there seems to be some songs missing.

There are also Character CDs, which have audio dramas of a character who had an identifiable theme in the anime, plus extra songs. These can normally be identified with the album art focusing on the characters alone.

Then there are Audio Episodes, I haven't heard to many (and I only know of the Code Geass ones). They use some tracks from the anime, but they also use music unique to the audio episode.