I have come across the following example of a non-separable Hilbert space:

Why do I need the discrete topology on $I$? Or more generally: why do I need a topology? If we talk about $L^p$ spaces in general, we only want a measure space and we don't mention a topology because $f \in L^p$ doesn't have to be continuous. Thanks for your help.