Apps you install from Google Play are linked to your account. This way, if you've paid for an app, uninstall it, and want to reinstall it again, you can easily do so without paying twice.
If you have logged in to your friend's tablet, this device is now connected to your Google Play account as well. It's a feature meant for when you buy a new tablet. This means you can download all apps you have bought or installed on your previous (own) cell phone. Being able to see your installed apps is actually what's supposed to happen when logging into your Google account.
It's very strange that Google thinks you're currently on your cell phone while you're actually using a different device. Your friend's tablet might have received the login token from your phone if you use the synchronisation features in Google Chrome, confusing their website.
It could also be possible that your device was doing something with your Google account (like updating apps) while you signed in.
Google can only really guess the exact device you're using when you log in to Google. Their current device indicator works most of the time but I wouldn't rely on it.
Try clearing the history, cookies, and login sessions from your friend's tablet, or go incognito in Chrome and see if the website still says you're on your phone. There isn't any spy app active and the indicator probably took a wrong guess on what device you were using.