The main reason you must remove your laptop from your bag is that its battery and mechanical components are too dense for X-rays to pass through easily, especially with older airport scanning systems. The same applies to power cords and other devices like tablets and cameras.