I'm pretty sure Thomas Marcyes is right. It's related to the term "pie chart." This article has a picture of a "pie chart:"
https://en.wikipedia.org/wiki/Pie_chart
A "pie chart" is a visual illustration of a set of percentages that always add up to 100%.
The reason why we call it a "pie chart" rather than a "cake chart" is that a pie is fairly flat. A pie chart looks more like a pie than a cake. "Pie chart" has become the standard name for kind of chart. You can't call it anything else; it's just the name for that kind of chart.
If you're not sure how pies and cakes look, try a Google Image search on "pie" and then on "cake."
Since we call it a "pie chart" it is natural to talk of the percentages as "pieces of the pie" or "slices of the pie."
When discussing economic tradeoffs, a set of percentages always adds up to 100%. If my share gets larger, your share gets smaller. But if we are talking about the economy, or income, or something like that, the actual total can get bigger. Since perhaps the 1970s, a common piece of rhetoric has involved the phrase "growing the pie." The idea is that instead of fighting over how to share a limited pie, we can make the pie bigger and then everyone will get more.
For example, if workers and management are arguing about how to share profits, workers might say "Our piece of the pie is shrinking." Management might reply "Let's not argue about how to divide up the pie, let's focus on growing the pie."
P.S. Former U.S. President George W. Bush once said "You bet I cut the taxes at the top. That encourages entrepreneurship. What we Republicans should stand for is growth in the economy. We ought to make the pie higher." People made fun of him for this, because in U.S. culture the idea of making a pie "higher" is ridiculous. You make a pie bigger by increasing its diameter.