There are lots of reasons for London's diversity.  You might want to read this blog piece that explains our huge and mixed population in lots of detail, drawing on history, politics and economics.  There is also one simple reason: it's a great city!