Why does Java have transient fields?
Because not all variables are of a serializable nature.
So if the Object can exists on memory but not on disk, then the Object can't be serializable, because the machine can't restore the memory map when deserialization.
Fro example, you can't serialize a Stream
object.
You can not serialize a Connection
object, because it's state also dependent on the remote site.