AC coupling on PCIe layout
You need the AC coupling caps to remove excess DC offsets from the transmitter, whether you are on one board or multiple boards, end of subject. You can even try it and have it work, but you , in this case, were just lucky. The caps cost $0.10 per direction for a single lane PCIe.