Re: main question.
It can range from a) companies fraudulently charging above/below market prices among departments/subsidiaries in order to fraudulently lower tax liabilities in a particular jurisdiction, to b) companies retaining profits and associated capital in the foreign country that the profits were earned in.
Most often, it refers to locating headquarters in a lower-tax jurisdiction regardless of whether the corporation has a substantial presence in that jurisdiction for its main area of business activity.
The other questions are all very complex and can have extremely numerous caveats and/or special cases, etc. The questions are also prone to predictable divisions along ideological lines.
However, here are some general points relating to each:
1) An empirical point of reference on the role of taxation in governmental capacity to address market imperfections: Somalia's tax-to-GDP ratio is about 10% (too low), while the tax-to-GDP ratio of the USA is above 30% (too high or too low?) and that of France approaches 50% (commonly viewed as too high). If all profits go overseas and are not taxed domestically, this could reduce the ability of government to correct market imperfections.
2) Does it add value elsewhere? Here you could enter into debates about what does it mean to "add value" (the most obvious assumption would be that you refer to "value added" as determined by monetary amounts representing value at different stages of production) or different views on "efficiency" (e.g., profit maximization of firms as compared to social welfare maximization in a society). I think you'd really have to get a handle on the main positions of the debate about those concepts, in addition to their most commonly used statistical indicators, in order to be sure of what exactly you're asking and/or want to ask.
3) Ignoring useful theories about things happening instantaneously and always equaling out in a way that is optimal across all uses: a) liquidity is needed both to undertake any investment opportunity that arises (including buying rivals for the purpose of enjoying monopoly profits or possibly for cost savings) and also to protect against liquidity shocks such as those related to a major fall in the value of capital assets across an economy (e.g., 2008-09); b) the case of holding a lot of cash should be compared to opportunities which exist for them to deploy liquidity to earn profit - for example, corporations should not be expected to engage in explicitly redistributive zero-value digging and filling of ditches (leaving specifically redistributive questions to the larger tax pool via government, which can more easily re-capture the value of human capital growth), and it is not desirable to "excessively" promote companies to deploy cash holdings in a pro-monopoly anti-competition manner.