First I thought it was for some other musical instrument (guitar?) but both the title and the shopkeeper told me that the music sheet was for piano.
Music: Practice & Theory Stack Exchange is a question and answer site for musicians, students, and enthusiasts. It only takes a minute to sign up.Sign up to join this community
On certain (typically more pop-oriented) piano scores, I have seen the guitar chord diagrams like that. I believe they are present so that, if someone wants to "play along" with chords on guitar, they could do so. I see that even more on songs (that is, voice with piano) in this style.
There's even a well-known abbreviation; if you see "PVG" on a book or score, it's for piano, with vocal and guitar also notated.
The diagram shows how a guitar player of moderate skill could play the indicated chord. Many guitar players have some chords they could play given just the name (generally C, G, D, A, E, G7, Dm, D7, Am, A7, Em, E7, and B7) but would not know how the fingerings for other chords. A different voicing for the Db chord (X-4-3-1-2-1, with the index finger playing both first-fret notes) would sound better, but would be harder to play. Some chords like A7 can be played in more than one way, and some sheet music will use one or the other depending upon what will work better in a given context, but I suspect many chord diagrams simply plunk on a typical fingering for each chord without regard for what chords appear nearby.
They're "guitar chord boxes". Remarkably useless objects. They rarely indicate anything more than the first entry for that harmony in the "book of chord shapes" with no thought of voicing appropriate to what comes before or after. But I suppose for guitarists who just want to "strum along", don't know their chords and don't have a book...
You'll find older music with 4-string shapes. These were for ukulele.