In the following picture :

1-why we need the property that $|f|^2$ is Lebesgue integrable for the given space 
to be a vector space, could anyone explain this for me please?

2-And why we identify functions which are equal almost everywhere, could anyone explain this for me please? 

[![enter image description here](https://i.stack.imgur.com/aT52o.png)](https://i.stack.imgur.com/aT52o.png)