Godot's setget functions provide a way to intercept changes and requests of a variables value, allowing to change the data, or make additional changes which should happen in reaction, such as updating a UI field when a value changed.
The same concept is commonly used for data encapsulation in other languages.