This is a common English saying that means that there are some things that you should not do, even if you are able to do them.
This phrase is usually used to give advice to someone who's using their money, power, or skill in a way that's not very wise.
You can use the phrase just as it is to respond to someone when they say they can do something:
A: I can go all day without eating anything.
B: Just because you can, doesn't mean you should.
Or you can include the actions that you can and shouldn't do, like in the example at top.