I think the purpose of the default setup is to exclude the media folder because it typically contains user-generated content. Publishing the media folder could potentially overwrite images or files that the webmaster has uploaded.
However, if you absolutely need to include the media folder in your publish output, you can explicitly target it for publishing by adding the following lines to your .csproj file:
<ItemGroup>
<Content Include="wwwroot/media/**" CopyToPublishDirectory="PreserveNewest" />
</ItemGroup>
If it doesnt work, you can publish to a folder and then run a CMD which copies the content over before you upload, thats how I do it, so I can control which of the db/media is copied.