MacBook Air display turning off when on top of other closed MacBook

I have two MacBooks, Mac1 and Mac2. Mac2 is closed and Mac1 is open. I put Mac1 on top of Mac2, and then after a few seconds, Mac1's display goes black. I pick it up, and then it's fine. I think it has to do with magnetism. Will this harm any of the computers?


System specs:

Mac1 - Model A1465, MacBook Air (11-inch, Early 2014), Processor is 1.4 GHz Dual-Core Intel Core i5, Memory is 4 GB 1600 MHz DDR3, Graphics is Intel HD Graphics 5000 1536 MB.

Mac2 - Model A1708, MacBook Pro (13-inch, 2016, Two Thunderbolt 3 ports), Processor is 2.4 GHz Dual-Core Intel Code i7, Memory is 16GB 1867 MHz LPDDR3, Graphics is Intel Iris Graphics 540 1536 MB.


That sounds strange, but it's possible that the bottom Mac's closed screen is tricking the top Mac's sensors into thinking that the screen has been shut.

What if you try inserting some "distance" between the two Mac's? For example, sandwich a thick book in-between the two computers?

In any case, I really cannot imagine there would be any damage to either device.