Why do all countries have a national anthem? How did it come to be standard practice ?

by ASucculentGoose

Question came up while watching the olympics. The only information easily found was a possible origin, nationalist 19th century Europe.

ohyosario

Follow up question: In Robert Heinlein's Stranger in Strange Land, he describes a monarch standing and bowing at the end of his land's anthem because it would be a tribute to them, versus a president or representative standing during their nations anthem because they would be a citizen. Is there any historical basis for this?