This phrase means "it's not always true that..." or "it doesn't mean that...". You use it to say that a common idea is not always correct.
。
It's not the case that you will definitely succeed just because you work hard.
、。
It's not necessarily good just because it's expensive, so let's consider the functionality as well.
、。
Just because someone is famous doesn't mean they are always kind.
、。
It wasn't that the decision at the time was a mistake, but there might have been a better way.
で、。
Just because it's not forbidden by law doesn't mean you can do whatever you want.