The intended purpose is to indicate a vessel’s current location and course so that other operators can see and avoid, especially at night.
Larger aircraft are also fitted with collision avoidance systems that automatically prompt pilots to climb or descend (and synchronise with the system on the other aircraft).
Bonus: day shapes are displayed on vessel mastheads to indicate the operating status of a vessel during daylight hours.