This type of behavior is innate (instinctive) and is determined by genes.
An egg outside the nest serves as a sign stimulus that triggers an FAP for this goose: roll the egg back into the nest with her bill.
An FAP follows simple pre-programmed rules - sometimes too simple.