In Bedwars, if you kill a player who is carrying diamonds or emeralds, you will indeed receive those resources as loot. So, if you eliminate an opponent who has collected diamonds or emeralds during the game, you can pick up those valuable resources from their dropped items.
However, when it comes to ender chests, things work differently. Final-killing a player does not grant you access to their ender chest. Each player's ender chest is personal and cannot be accessed by other players. It's a secure storage space for each player to keep their most valuable items safe from looters.
So, while you can benefit from diamonds and emeralds dropped by defeated players, you won't be able to access or loot the contents of their ender chests.