Had this problem after I bought a Microsoft band and set it as a trusted device.
Samsung have a feature called "smart lock", settings => General => security => smart lock (hidden away at bottom).
This feature allows the phone to unlock if it's near a trusted device - watch, car, home - but...