It is one of the major and most challenging tasks of a project manager to build a time schedule.
The exercise is of course the foundation of the more general plan as it establishes the start and the end if the project and gives a clear frame to the execution.
Unfortunately inputs for building the schedule must align from many stakeholders and their interests are very often (almost always I would say), completely opposite.
From the top management generally sponsoring a project, the request is permanent acceleration. Therefore aggressive deadlines are never aggressive enough. On the other hand, people who have to execute the tasks, in the majority of the cases, tend to be either too optimistic or pessimistic. In the first case silent killers able to spoil the schedule are the underestimation of the effort or not evaluating concurrent tasks, or simply the complete absence of contingency in the proposed delivery date.
For pessimists, the achievable delivery date is so much pumped with risks mitigation that it would not fit in a geological age...
Both tendencies have to be taken in account from the PM building the plan. But, another hidden enemy, is the passive acceptance of management requests without getting an appropriate feedback from the team. Putting just on the table the requests and not testing their feasibility, will later explode with an unexplainable delay.
Solutions? Not a single one. Ideal world does not exist and there is definitely not a single process solving the issue.
What must be always present in the PM view is that nothing gets written in Stone and a plan changes continuously. So, the nice painted MS project must be revised and communicated again and again. Alarms must be detected when things are going wrong.
But last and not least, the PM cannot believe that not negotiated and agreed dates, both coming top down or proposed bottom up, will simply fit together: they are fundamental triggers for further alignment.
That magic chemistry to achieve the expected results is what a PM is paid for...