To elaborate on @keshlam's point about older music, there are all sorts of musics for which regular measure lengths are simply not part of the genre.
Go back far enough and you'll find non-mensural music, such as Gregorian and pre-Gregorian chant. The music of the trobadors (11th-13th centuries) was not noted with rhythm, and there's an argument made that that's how it was performed.
More recently (16th century) you'll find mensural music (i.e. music in measures) where the music changes time signature very frequently. Like, randomly. There was an artistic movement in late 16th century France called musique mesureé, which was somewhat experimental: it was a form in which the composer set poems by deriving the note durations from the rules (as they were understood at the time, and applied to then-modern French) of classical Latin poetry. Astonishingly for such a mechanical gimmick, the resulting music is very attractive and accessible, even while having pretty much completely randomly fluctuating bar lengths. In my experience, modern editions of the scores for this repertoire don't even bother notating the time signature, or handwave through it by calling the beat the measure and declaring the piece to be in some flavor of 1. (I think a crucial part, for modern musicians, of learning to play Renaissance music is getting over the anxious need to be told what time signature you're in all the time.)
I understand something similar is true for znamenny polyphony, for which basically measure marks are lies, despite being contrapunctal and even in a sense syncopated. (My director: "I, uh, will be beating 1, unless any of you guys have a better suggestion.")
And then there's modern music which, really, can do whatever it feels like. I remember from when I was a kid, but now cannot find, a really gorgeous concert band piece* which was in 4/4 except whenever it felt like it being in 5/4.
So, yes, measures can have whatever number of beats in them the composer wants to put in them, and composers can dispense with measures altogether.
But that? Your example? That's a pick-up, as explained above.
* Named, completely unhelpfully, "Passacaglia". And I have no recall of the composer.