Which Wi-Fi hotspot you use has no bearing on the issue – unless you're talking about two hot-spots located in different countries, in which case there might sometimes be regional differences in which songs are available.
[EDIT: The following is with respect to the Music application on the Mac. On an iPhone, the Music and iTunes Store apps are different. If you buy music in the iTunes Store app, it would show up in your Music library, but I haven't played around to see whether there might be options for buying music directly from the Music app.]
The Music application provides an interface to let you
- Store, and listen to, purchased music – such as music purchased on CD.
- Buy music in electronic form from the iTunes Store.
- Listen to music from an Apple Music streaming subscription.
If you have an Apple Music streaming subscription, and have "Sync Library" turned on, you can download offline listening copies of songs. These songs have DRM – and will stop playing (or be removed from your library) if you ever stop subscribing to Apple Music, but there is no extra charge for them.
Songs purchased from the iTunes Store do have a charge associated with them, but are yours to keep.
I suspect that you are seeing the option to purchase songs from the iTunes Store and are mistakenly associating it with using a different Wi-Fi access point.