The parents being charged and facing prison acts as a deterrent to others who would criminally leave loaded guns where a child could get them. 

For a deterrent to work, the knowledge of its existence must be widely disseminated.