If a foreigner stays in Poland for more than 30 days, he is obliged to register in Poland.
In this situation, you do not need to submit a separate application for PESEL. In such a situation, the appropriate office assigns a PESEL number to the foreigner.

However, when a foreigner does not want to or cannot register, for example for example because he does not live in Poland for more than 30 days (he is employed for the purpose of delegation), the employer does not provide the employee with any accommodation in Poland, such foreigners will not be included in the PESEL register.
The PESEL number allows the tax authorities to uniquely identify the taxpayer (employee).
This allows you to create and file a tax return in the Twój e-PIT service on the website podatki.gov.pl.

For foreigner, it also means the opportunity to take advantage of benefits and deductions, as well as receive a refund of overpayment of personal income tax.