The ARIZAL writes about it but once a Rabbi told me that the source actually comes from an earlier Midrash:
Tomorrow night (Thursday), the seventh day of Pessach begins. Friday is a holiday and, in the evening, Pessach will be finished. However, we are going straight into Shabbat.
Why is the seventh day of Pessach so significant ? Because it was the day when the Jews were crossing the Red Sea. The sea split, the Jews went through and the Egyptians were killed.
As I mentioned the Kabbalist Yitzchak Luria (the ARIZAL) and the Midrash before, it says that the Jews didn't just go together through the Red Sea but in groups. Each one according to their Tribe. All the Tribes went through separately but they could still see each other.
What is this going to teach us ?
Each Tribe had its own character. The same with each individual Jew. Zevulon is not like Yissachar and Yehudah not like Asher. Each has its unique character.
Why didn't G - d just create the Jewish people without all those Tribes ? Just one people without any Tribal issues and Cohanim / Levi'im.
In order to show us that we are all different and we all have different tasks in this world. We are one people but, individually, we are different from each other. One is a businessman, one a scientist and one a Rabbi. We still see each other and belong together but, one the other hand, we still have individual characters.
"Okay, that sounds logical but the question is whether we are still able to accept each other".