The density is different in the two plots because in one case you have 365 times as many units horizontally, so the vertical units will need to be 1/365th those of the other plot, given that probability density functions (the areas under these curves) must sum to one.
This is easier to think about in terms of bins rather than density curves. If you have one bin replacing 365 bins, the probability of landing in the one bin is much higher than the average probability of landing in the individual bins.
For the specific sample data you provide, we can see the conversion between the vertical units by looking at the peaks of both functions:
> max(density(df$age)$y) # max of density in days, more horizontal units
[1] 0.0002178977
> df$ageinyears <- df$age/365 # create an age-in-years variable
> max(density(df$ageinyears)$y) # max density in years, fewer horizontals
[1] 0.07953267
> max(density(df$age)$y)*365
[1] 0.07953267
The practical reason this is an issue in plotting (and possibly the main thrust of your question) is the function that is estimating the density for ggplot is inheriting the x argument from the parent aes(). So it does not know anything about the custom x-axis you are using. Rather than just changing the x-axis in your first plot, you could explicitly tell geom_density not to use the inherited x values:
ggplot(data = df, aes(x = age)) +
geom_density(aes(x = age/365, y = ..density..))