If you cut it straight out of the oven, it will fall apart, so you should let it rest ideally for at least 30 minutes. The lasagna needs time to set and firm up, this happens as it cools. In addition, it helps the flavors come together, but this is not the main reason.