iMac monitor unexpectedly comes back on
When you put the display to sleep, it turns back on when the computer detects a key press or mouse movement or mouse click. In your case, it seems like your speaker vibration is causing the mouse to move, and thus waking up the display. The best workarounds are to avoid mouse movement by moving the speaker away from the mouse or placing the mouse on a surface that absorbs the speaker's vibrations or reducing the speaker volume.

Note that you could reduce the sensitivity of the mouse by going to System Preferences > Mouse and then selecting a slower Tracking speed. But this would also likely make your system difficult to use - you'd have to physically move the mouse farther to move the cursor by a particular distance on the screen - and you may have to switch between two levels of sensitivity (slow and faster) often if you're not happy with the slow tracking setting for normal use.