I've had it happen a few times. Most recently a company told me at the time that they were impressed but it would've been a waste of my time and skillset to take the role they were hiring for (VP at BigCo). About a year later they reached out with a generous offer for a role they had created specifically for me, which genuinely was a better fit.
I've been on the other side of that conversation as well. It usually happens when someone really impresses and stands out but doesn't actually match what the role requires. If you have a limited hiring budget, you can't always squeeze in a person you'd love to hire in addition to someone that fills the critical role. Smart companies will invent a role for great talent, if they can make the budget work, but that often takes a lot of time to put together.
I've been on the other side of that conversation as well. It usually happens when someone really impresses and stands out but doesn't actually match what the role requires. If you have a limited hiring budget, you can't always squeeze in a person you'd love to hire in addition to someone that fills the critical role. Smart companies will invent a role for great talent, if they can make the budget work, but that often takes a lot of time to put together.