Lobsters are the hosts to an incredibly dangerous bacteria that can cause anything from severe food poisoning to death in humans.
The thing is, this bacteria only starts to spread itself on the meat of the lobster after it dies, giving you a small margin of time to work with the meet before it becomes toxic for humans so a solution was found since lobster meet is so dangerous but delicious at the same time.
The solution? keep them alive in tanks until the time comes to serve them, this way most of the Lobster goes from being alive to cooked alive and eaten in a short spawn of time, thus making it safe for human consumption... and no, you can't kill this bacteria by cooking it like we do with other meats or else we would be cooking every animal alive lol
Lobsters are kept alive because like all shellfish there is a bacteria that is naturally present in its flesh. When they die this bacteria multiplies and spreads releasing toxins that cannot be destroyed by cooking. This results in cooking the lobster alive to minimize food poisoning.
It has often been thought that transporting a lobster in ice making it sleep and in a dormant state but alive is the best way. A lobster will twitch it's tail when being boiled but that is literally a few seconds. It is not known whether they feel pain but the latest theories are that it is possible.
Switzerland has just passed a law making it illegal to cook live lobster in Switzerland.