Also, it's easy to play "random" chords from a tonality and end up in a different mode without even realizing it. E.g.: A minor (the key, also known as A aeolian) has the exact same diatonic chords as C major (but the reference, i.e. tonal center, is A instead of C).
A large part of tonality is chord position in the piece, which is also greatly influenced by dynamics, melody, accompanying instruments, harmony, harmonic progression (both immediate/local and global)...
Also: Cmaj7 (the chord) is C-E-G-B and Emin6 is E-G-B-C (notice the similarity?), but E-G-B-C can also be interpreted as Cmaj7 in first inversion depending on context. Sometimes roots are omitted from chords so E-G-B (Emin at first sight) could be interpreted as Cmaj7(no root). Just like C-E-G could be a rootless Am7 (A-C-E-G with omitted A). They are often used as substitutes of one another in jazz.
Music is just too complex and musical language (chord names etc.) is just a hack developed around traditions and conventions, not science. It's mostly notation of intention, since everything can be twisted to mean something else.
The more music theory I know, the less definite answers to musical questions are.