Loose connections/extra wires issues arise due to poor workmanship. If too many wires stuff inside the switchboard, then it can cause overheating, short circuits, and fire. If the wire is not properly connected with switch/socket or loose in the screw terminal, it will allow main and neutral wires to touch, and that may cause a short circuit or fire.
When we observed buzzing or crackling sound from switchboard or lights are flickering, this may cause due to loose or improper wire connection. This kind of issues can be avoided by doing a proper home inspection before taking possession from developer/seller