There's more than one way to tune a guitar to a piano. If you tune one of the E strings to the E on the piano and then proceed to tune the guitar using harmonics (3rd overtone on the lower string to the 2nd overtone on the next higher string) then the remainder of the strings will be slightly off with respect to the (presumably equally tempered) piano. On the other hand, if you tune each guitar string individually to the corresponding piano key, you'll match the piano better, but the guitar may sound off to you, if you are very sensitive to such small changes.