I found some additional info on a related post here that's probably more relevant regarding how checksums are calculated: How does finger print digest gets calculated in Rails 4.2
I'm also leaving my original answer below because I think it's still relevant:
I think this is behavior is working as designed. Sprockets may have changed since the time this question was asked, but I think this code comment might explain why:
# Caveat: Digests are cached by the path's current mtime. Its possible
# for a files contents to have changed and its mtime to have been
# negligently reset thus appearing as if the file hasn't changed on
# disk. Also, the mtime is only read to the nearest second. It's
# also possible the file was updated more than once in a given second.
On my macos System:
pry > File.mtime("Rakefile").to_i
=> 1605021933
On a remote Linux server, with the exact same file pushed up:
pry > File.mtime("Rakefile").to_i
=> 1606847789
In my case, I've noticed the mtime of my files get modified/updated locally (macos) for reasons that aren't clear to me. I think it's caused either by a vim plugin I'm using (fzf? an indexing tool? I haven't researched it)
If you do an MD5 on these two files they're identical though.
tldr; The assets may be identical, but the hash appears to include other information which could vary from system to system