The key essence of p2p is that the data is not needed to transfer from the source device to the host server. The destination device can directly DMA read through the PCIe bar. For that reason, the first sync operation, which is transferring the data from the source device to the host is not required.
Optional step: You may try changing host.cpp by commenting out the first sync operation as shown below, compile and execute again:
// out1.sync(XCL_BO_SYNC_BO_FROM_DEVICE);
in2.sync(XCL_BO_SYNC_BO_TO_DEVICE);
You will see the test case fails. It is because p2p is not enabled yet, and hence transferring the data from source device to host remains a necessary step.