The U.S.S.R. needed a warm water port and Kaliningrad bordered the Baltic States which were then part of the U.S.S.R. Much of Eastern Poland was incorporated into other Soviet states and Poland was compensated by being given much of what used to be Prussia. Max Hastings writes about this in his fantastic book Armageddon.