system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why does tooth paste come in a tube? and are there any companies that don’t put it in a tube?
gpt
You don't want it to get manky or dry out. So it needs to be in a closed container without air, and you don't want to be touching the bulk of it. Also you don't really have a suitable tool to scoop it out of e.g. a tub.

So the options are pretty much a flexible tube or an airless pump. You could probably do aerosol toothpaste like shaving gel, but it is much gloopier so might struggle to come out.