Getting sacked or getting the sack generally means that they have their employment terminated, get dumped by a girlfriend/boyfriend, or similar. The idea is that the person loses out on something good, so they are sacked. Where does this phrase come from?
In the ‘olden days’, long before the modern age began where everything is now mass-produced, workers or laborers would carry their tools with them in a sack. If a farmer hired someone to thatch his roof, for instance, the person who was hired would have the equipment he needed in a sack. This allowed him to travel, working for people along the way.
When the worker was finished with his work, he didn’t need to ask his employer if they were satisfied with what was done. It wasn’t necessary. In the example above, if the roofer did a good job and the farmer was pleased with the work, the farmer would simply hand the man his sack containing his tools. In other words, the job was finished and terminated when the employer literally gave the worker the sack.
The meaning has changed a bit since it originated because originally, getting the sack or getting sacked wasn’t necessarily a bad thing. The worker might no longer be employed by that particular employer but he was free to take his payment and move on to the next job.
Perhaps because it is human nature to be that way, the phrase now almost always has to do with a negative consequence or action.