Hugging the curb is just asking for trouble. Its a well observed phenomenon that drivers will give you the same clearance that you give yourself . If you ride wide, they pass wide, if you ride close....
Riding wide discourages drivers from turing across your path, puts you in a better position to avoid glass, pedestrians, doors, potholes, and places you in a part of the road that drivers are observing.
"Effective Cycling" programs show how to place yourself safely in various circumstances.