A person who gathers wealth or power through dishonest means will never enjoy those gains for long. Eventually, a higher justice steps in, forcing the corrupt individual to lose every single thing they have wrongfully hoarded.
The primary approach among commentators understands this hoarding in terms of material wealth and money. The act of swallowing represents the greedy consumption and stockpiling of these riches [רש״י, רלב״ג, מצודת ציון, ביאור שטיינזלץ]. However, no matter how deeply this wealth is consumed, it will not remain secure. The corrupt person will be forced to give it all back, violently expelling the ill-gotten gains as if vomiting them up [מצודת דוד].
Taking a slightly different perspective, another interpretation suggests that the swallowed item is something healthy, strong, and solid. Even if a person consumes a heavy, hard-to-digest food, they will ultimately be forced to bring it back up [מלבי״ם]. Alternatively, this process can be understood as a powerful metaphor. Rather than physical property or food, the swallowed items are an accumulation of toxic thoughts and harsh words that the person held back and kept inside over time. Eventually, all of this buried negativity is expelled at once, a sudden release that only deepens the person's own suffering [אלשיך].
The ultimate cause behind this sudden loss is not a natural physical reaction, but the active, direct intervention of God. Through His providence, God forcefully drives out whatever was consumed, pulling the wealth, the heavy food, or the toxic words directly from the person's stomach [מצודת דוד, מלבי״ם, אלשיך]. This act of eviction is absolute and complete [מצודת ציון, ביאור שטיינזלץ]. Even if the stolen wealth or buried evil has already been fully digested and integrated into the person's life, God will relentlessly extract it [ביאור שטיינזלץ].