Having a country flag may be an obvious thing, but for a long time it wasn't. There isn't really one point in time, or even one place, where the idea evolved. It evolved over hundreds of years and flags were used in different ways in different places. This is how we (probably) got to have the idea of a national flag.