Many natives don't prefer foreigners taking their jobs, is it actually a bad thing for the countries economy?
It varies. Importing a pool of labor, if we are to consider labor costs can have an impact if the migrants are willing to take lower wages. We know that R(revenue) = (MPK + MPL) * Price, which simply means the marginal product of capital + the marginal product of labor times price equals a firms revenue. Let’s assume that the additional labor will take lower wages. That can reduce a firms labor cost which is L * W (Labor quantity * wages). As labor costs decrease a firms profit can increase if revenue remains the same. This increase in Revenue leads to higher savings, which leads to budget surpluses. Capitals share of Income will grow. So we know that firms and the owners of capital (typically shareholders) benefit. The consumers are either unharmed, or get lower prices if the firm can reduce prices due to the lower Labor costs.
So you may ask “who’s hurt?”. Well in the short-run the people who lost their jobs to the migrants who were likely to take lower wages for low skilled labor (based on ethnic wage rates) were hurt. Essentially, you’d expect owners of capital to prefer migrants, and for workers (labor) in the impacted sector where the migrants flow to hate it.
So to answer your question (is it actually bad for the countries economy), no. Not in it of itself. GDP would be expected to grow in real terms (output), or not be impacted much at all. You could end up with increased profits and savings as well, which can lead to a savings surplus. Now whether or not there are certain individuals who are negatively impacted is another question.