Let’s play a game. I have 12 cards, with for every unique note one card. So C, C#, D, D# and so on. Now when I ask you to take out the cards which for a major scale, for example C major, you need to pick out C, D, E, F, G, A and B, right? Or when you choose G major you’ll need to take out the G, A, B, C, D, E and F#, right?
Now look at the cards left, what scale are these forming? Well, let’s see. If you took out the notes forming a major C what’s left are those notes: C# D# F# G# A#. These notes are forming a D# pentatonic minor or a F# pentatonic major. Both scales are relative, containing the same notes.
This is neat right? Any 12 notes contain both a major scale (or any of the relative church scales) + the pentatonic.
If you look at the piano keyboard you can see it clearly: the white keys make a major scale (or any of the relative church scales) and the black keys form the pentatonic.