Hi Robert, That any member of a replica set (that is not configured as an arbiter) can become a primary is quite normal and there is nothing to worry about. If the current primary became unreachable for whatever reason (network issues, downtime, etc) a 'voting' process takes place to determine which of the secondaries becomes the primary. And when the previous primary became available, it would become a secondary.
This is all done transparently to the application ... and the driver should always connect to the current primary.
Robert Moran
Software Engineer with passion for Web