Why did the task dates change after I assigned a resource to the task?

Task dates are updated for fixed effort tasks based on the resource calendar. So, if a resource isn't working on a certain date, the task duration is extended.

Let's say you have a task that takes four days of effort, starts on Monday, and ends on Thursday. If you assign a resource with 100% allocation who isn't working on Wednesday, the task finish date moves to Friday.