Characteristics of a "project", as per the Project Management Institute, are that it is temporary and unique (ie. non-routine).
For a person employed to work on a project, the temporary nature of the work is likely to be a source of additional cost and risk, as compared with a person in a permanent job. This is because, as the project comes towards its end, the person is likely to have to find another job. That involves both the transaction costs of finding a job (searching, assessing whether jobs are suitable, negotiation, etc., implying time and effort if not monetary costs) and the risk of not finding a suitable job when needed and therefore experiencing a loss of income. These factors suggest that to recruit to a project role will require somewhat higher pay than to recruit to a permanent job with a similar skill level.
An exception to the above is where a current staff member in a permanent job is seconded to work on a project. Provided they can be sure that at the end of the project they can return to their original job, they will not be subject to the sort of risk described above. On the other hand if a current staff member is to be asked to work on a project while also keeping their regular work going, they may decline unless offered higher pay (for reasons of workload, not risk).
A further issue is how pay for project work might be structured. Suppose A is working on a project which is 90% complete. The employer will want A to stay and complete the project. But A knows that staying until the end of the project will increase the risk that they will find themselves without a job. So they will be tempted to apply for other jobs before the project is complete. Hence there is a risk for the employer, ie that the departure of a key person will mean that completion of the project becomes problematic. To address this, an employer might consider a pay structure consisting of a regular monthly salary plus a bonus payable on successful completion of the project.
But that in turn raises the issue of asymmetric information. Because of the non-routine nature of project work, it may be that only those working on the project really know how near (or far) the project is from successful completion. This is especially likely where the output of a project is not very visible or tangible, an ICT system implementation for example. So even if the project is only 90% complete, and A knows that, there is a risk for the employer that A will leave to take another job while also persuading management that the project is complete and receiving the bonus.