By default, your Profile is Public in Steam and the privacy of your game details is set to Friends only. This means that your friends can see also your playtime on Steam. If you want to hide your playtime, open the Privacy Settings in Steam and then enable the "Always keep my total playtime private even if users can see my game details" checkbox.