The following code, behaves little strange.
<ListBox SelectionMode="Multiple">
<StackPanel>
<TextBlock>Selection is Black</TextBlock>
</StackPanel>
<ListBoxItem>
<StackPanel>
<TextBlock>Selection is White</TextBlock>
</StackPanel>
</ListBoxItem>
</ListBox>
Note that first selection stays in black color, that is because the Item is not its own ItemContainer, however in 2nd case Item is its own ItemContainer so the style works correctly. Majority of time we populate data through templates and everytime our Item is not its own ItemContainer and thats why TextBlock behaves strange with respect to foreground color.
Important: I am looking for the answer to "Why this happens" not how to solve it, I know the workaround TextElement.Foreground="{TemplateBinding Foreground}", but I want to know why this is happening.