A full ordered set of cards, and a flat raised surface. Both are things laid out ready to be used.
Middle Dutch dec (a covering, roof), related to English thatch; a flat covering surface, extended to a full ordered set of cards laid out ready on such a surface.
The Dutch root is a covering, a roof laid flat over something else, and both later senses kept that flatness. A deck of cards and a ship's deck are each a surface laid out for whatever happens on top of it.