PCI-e slots are not wired randomly or different from one manufacturer to the next. There is a proper standard and they follow it.
If you have a x16 slot wired as x4, that means you have 4 lanes wired to a slot that can physically accommodate a card that has a 16 lane wide connector on it. It has nothing to do with the speed of the slot. The speed is a function of bandwidth per lane multiplied by how many lanes you are using. The lanes run at the same speed, whether you have 1, 4, 8, or 16. PCI-e devices will work with fewer lanes than their physical card-edge connector allows by only communicating using the lanes available in the add-in board slot on the motherboard, and this is by design.
Whether or not your device needs as much bandwidth as it's connector allows has to be taken on a per device basis, but usually, even with graphics cards, the bandwidth requirements are much lower than the interface supports.
A few reasons to have a x16 add-in board slot wired to only 4 PCI-e lanes come to mind.
If the motherboard had only a x4 physical slot, you couldn't use a card that uses a x16 connector, such as a graphics card. Since the vast majority of graphics cards fall short of needing a full 16 PCI-e lanes for bandwidth, plugging a mid-tier or lower GPU into a x4 slot isn't as unreasonable as it may seem on the surface, arguably opening up the opportunity for AMD's CrossFire.
You may have a x16 slot wired to only 4 lanes is because, often times there are only 4 lanes left to wire there, after all other devices on the motherboard have been wired up. Manufacturers don't have an unlimited amount of lanes to throw around, therefore you usually have at least one full sized slot that they don't have enough free PCI-e lanes left to fully wire up.
Routing PCI-e lanes on a motherboard adds to expense. The more fully wired slots the more expensive the motherboard. Having some slots not fully wired is a way to reduce cost, especially when most folks will never need a 2nd, fully wired x16 slot.
As for a x4 device going into a x16 slot wired to 4 lanes... Your slot has 4 lanes wired to it, therefore will give you a standard x4 connection. The only difference is the physical add-in board slot on the motherboard. It's big enough to accommodate up to a x16 card edge connector.